I find itertools.islice() useful, so for Python 3.x I may like to see it removed from the itertools module, and the normal slicing syntax [::] extended to work with generators/iterators too.
from itertools import islice primes = (x for x in xrange(1,999) if all(x % y for y in xrange(2, x))) print list(islice(primes, 0, 20)) ==> print list(primes[:20]) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list