Author flox
Recipients flox, georg.brandl, mm
Date 2010-01-17.00:33:49
SpamBayes Score 0.0147181
Marked as misclassified No
Message-id <1263688431.52.0.191937691683.issue7721@psf.upfronthosting.co.za>
In-reply-to
Content
You will prefer this one. It is as fast as the 2.7 version.
The restrictions are described in the itertools documentation.


from itertools import count, takewhile
irange = lambda start, stop, step: takewhile(lambda x: x<stop, (start+i*step for i in count()))

>>> list(irange(-2**65,2**65,2**61))
[-36893488147419103232L, ...
History
Date User Action Args
2010-01-17 00:33:51floxsetrecipients: + flox, georg.brandl, mm
2010-01-17 00:33:51floxsetmessageid: <1263688431.52.0.191937691683.issue7721@psf.upfronthosting.co.za>
2010-01-17 00:33:49floxlinkissue7721 messages
2010-01-17 00:33:49floxcreate