Message97917
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) |
|
Date |
User |
Action |
Args |
2010-01-16 22:56:38 | flox | set | recipients:
+ flox, georg.brandl, mm |
2010-01-16 22:56:38 | flox | set | messageid: <1263682598.26.0.525809432495.issue7721@psf.upfronthosting.co.za> |
2010-01-16 22:56:36 | flox | link | issue7721 messages |
2010-01-16 22:56:36 | flox | create | |
|