Jean-Paul Calderone wrote: > On Wed, 04 Oct 2006 11:00:28 -0400, Leif K-Brooks <[EMAIL PROTECTED]> > wrote: >>Jorgen Grahn wrote: >>> - infinite xrange()s >> >>itertools.count()? > > Not quite: > > >>> import sys, itertools > >>> c = itertools.count(sys.maxint) > >>> c.next() > 2147483647 > >>> c.next() > -2147483648 > >>> > > Jean-Paul
>>> import sys >>> from itertools import count >>> c = count(sys.maxint) >>> c.next() 2147483647 >>> c.next() 2147483648L sys.maxint and then some cheers on Python 2.5 :-) Peter -- http://mail.python.org/mailman/listinfo/python-list