python preallocate some integers?

Dave Reed drlinux at columbus.rr.com
Tue Oct 19 12:40:21 EDT 2004


I seem to recall somewhere, possibly in the Python Essential Reference
(but unfortunately, books don't have a "find" function), that Python
preallocates and never destroys the first 100 integers. A minute of
google searching didn't help me so I tried some simple tests. Based on
these, it appears that only one copy of the integers -5 through 99 is
created.

Can someone please verify this for me or tell me what is done with
regard to this?

Thanks,
Dave






More information about the Python-list mailing list