Python 'for' loop is memory inefficient

Terry Reedy tjreedy at
Tue Aug 18 05:56:58 CEST 2009

exarkun at wrote:

> There's a lot of things in Python that I don't strictly *need*.  That 
> doesn't mean that they wouldn't be welcome if I could have them. Getting 
> rid of the range/xrange dichotomy would improve things.

The developers agreed a couple of years ago. Starting using 3.1 if you 
want this.

Since 'range' could refer to a user-defined object, rather than the 
builtin function, there is no way the interpreter should substitute 


More information about the Python-list mailing list