Steve Howell wrote: > --- Steven Bethard <[EMAIL PROTECTED]> wrote: >> How about we just comment it better? >> >> import itertools >> >> def iter_primes(): >> # an iterator of all numbers between 2 and +infinity >> numbers = itertools.count(2) [snip] > > Actually, just one small caveat--I'd still want the > program to print out the results. I think I've > followed that convention for all the other programs.
Good point. Adding something as simple as:: # print the first 100 primes for prime in itertools.islice(iter_primes(), 100): print prime to the end should make it a full-fledged program. STeVe -- http://mail.python.org/mailman/listinfo/python-list