Mathias Panzenboeck wrote: > def primes(): > yield 1 > yield 2 > [snip rest of code] >
Hmm... 1 is not a prime. See for instance http://en.wikipedia.org/wiki/Prime_number The definition given there is "In mathematics </wiki/Mathematics>, a *prime number* (or a *prime*) is a natural number </wiki/Natural_number> that has exactly two (distinct) natural number divisors </wiki/Divisor>." The important part of the statement is "exactly two...divisors", which rules out the number 1. /MiO -- http://mail.python.org/mailman/listinfo/python-list