Mystery of Python

Paul Prescod paul at prescod.net
Wed Feb 9 10:38:23 EST 2000


Ahh, the mysteries of Python's implementation. I thought others might
find this interesting:

>>> for char  in "abcdefghijklmnopqrstuvwxyz":
...     print sys.getrefcount( char  )
...
3
3
3
3
5
3
5
5
3
3
3
5
3
3
3
3
3
4
3
3
3
3
5
3
3
4
>>> sys.getrefcount( "i" )
19
>>>
-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
The calculus and the rich body of mathematical analysis to which it gave
rise
made modern science possible, but it was the algorithm that made the
modern
world possible.
	- The Advent of the Algorithm (pending), by David Berlinski





More information about the Python-list mailing list