Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use next() builtin instead of .next() method for Python3 compatibility

  • Loading branch information...
commit 5a3e3bfbec503d7f7ce7596093eb2c60fca718c9 1 parent 39766d7
@glyphobet authored
Showing with 1 addition and 1 deletion.
  1. +1 −1 
2 
@@ -8,7 +8,7 @@ def generate_primes():
while True:
n += 1
- if n == factor(n, primes).next(): # if n is its own (first) factor, it's prime
+ if n == next(factor(n, primes)): # if n is its own (first) factor, it's prime
primes.append((n, n**2))
yield primes[-1]
Please sign in to comment.
Something went wrong with that request. Please try again.