Florent Xicluna <la...@yahoo.fr> added the comment:

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)

----------
nosy: +flox
stage:  -> needs patch
type:  -> behavior
versions:  -Python 2.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7721>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to