Browse Source

Small improvement to primes_until()

Taddeus Kroes 13 years ago
parent
commit
5f5961bc42
1 changed files with 1 additions and 1 deletions
  1. 1 1
      utils.py

+ 1 - 1
utils.py

@@ -35,7 +35,7 @@ def primes_until(n):
         if not lst[i]:
             yield i
 
-            for j in xrange(i, n, i):
+            for j in xrange(i + i, n, i):
                 lst[j] = True
 
         i += 1