Kirk McDonald wrote:
> Scott David Daniels wrote: <an elaboration on ids and refcounts>
>
> You know what? That makes perfect sense. Thank you.
Thanks a lot for mentioning this. I do try to help out, and sometimes
it feels like talking to the wind. A thanks every now and then is
greatly appreciated.
Just for fun, you can play with:
import sys
sys.getrefcount(123**18)
vs.
sys.getrefcount(12)
You should know that 'small' integers are kept and shared once built.
Similarly, some strings (including all one-character strings and strings
that might be identifiers).
sys.getrefcount('a')
sys.getrefcount('probably_not_really_a_variable')
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list