Update debugger docs with () and 'cy set'
[cython.git] / examples / tutorial / primes / primes.py
1 def primes(kmax):
2     result = []
3     if kmax > 1000:
4         kmax = 1000
5     while k < kmax:
6         i = 0
7         while i < k and n % p[i] != 0:
8             i = i + 1
9         if i == k:
10             p[k] = n
11             k = k + 1
12             result.append(n)
13         n = n + 1
14     return result
15