Memory leak while looping

Steven Taschuk staschuk at telusplanet.net
Thu Apr 17 18:14:36 EDT 2003


Quoth Brandon Beck:
> [...] Consider using the generator (or maybe it's just generator like)
> version of range, xrange.  That should run in constant memory.

To be precise, xrange creates an immutable sequence object -- an
iterable, not an iterator (and in particular not a generator).

-- 
Steven Taschuk              Aral: "Confusion to the enemy, boy."
staschuk at telusplanet.net    Mark: "Turn-about is fair play, sir."
                             -- _Mirror Dance_, Lois McMaster Bujold





More information about the Python-list mailing list