Author flox
Recipients flox, georg.brandl, mm
Date 2010-01-16.22:56:36
SpamBayes Score 0.000130077
Marked as misclassified No
Message-id <1263682598.26.0.525809432495.issue7721@psf.upfronthosting.co.za>
In-reply-to
Content
Confirmed. The snippet works for 3.1 and 2.7a2.

from itertools import count, islice
irange = lambda start, stop, step: islice(count(start, step), (stop-start+step-1)//step)


The documentation needs update for 2.6 only.

This kind of snippet seems backward compatible for 2.6:
irange = lambda start, stop, step: islice(count(start), 0, stop, step)
History
Date User Action Args
2010-01-16 22:56:38floxsetrecipients: + flox, georg.brandl, mm
2010-01-16 22:56:38floxsetmessageid: <1263682598.26.0.525809432495.issue7721@psf.upfronthosting.co.za>
2010-01-16 22:56:36floxlinkissue7721 messages
2010-01-16 22:56:36floxcreate