API/C memory mananegemnt problem

Alex Martelli aleaxit at yahoo.com
Sat Mar 11 20:58:06 EST 2006


<plahey at alumni.caltech.edu> wrote:

> This exactly what I was thinking.
> 
> Are we wrong Alex?

Nope, you're not -- since ints aren't "immortal" (but rather limited to
being reused as other ints), then, if at no _other_ place in your
program do you ever need to be storing N ints at the same time, looping
on an xrange of N items does reduce maximum memory needed by your
program compared to looping on an equivalent range.


Alex



More information about the Python-list mailing list