Translate this to python?

Paul Rubin http
Sat Jan 7 08:57:58 CET 2006


Heiko Wundram <modelnine at bit-bukket.org> writes:
> I know this, and that's one of the reasons I'm a little at odds with Python
> 3000...  some things are so basic (such as
> xrange) I wouldn't want to have to implement them every time I need such a
> beast.

Itertools.count could be extended to replace xrange.

> Unless of course range() becomes "more clever" and returns an iterator in
> case the amount of memory to store the needed range is too large...

That could break things.  Range is supposed to return a list.



More information about the Python-list mailing list