Python 'for' loop is memory inefficient

Paul Rubin http
Sun Aug 16 21:44:33 EDT 2009


exarkun at twistedmatrix.com writes:
> Although I think PyPy also recognizes this case and makes it as
> efficient as using xrange, and does so without breaking any rules.

How can pypy possibly know that the user hasn't assigned some other
value to "range"?



More information about the Python-list mailing list