Christian Heimes wrote:
You are getting the result because Python optimized small integers. See http://svn.python.org/projects/python/trunk/Objects/intobject.c Integers between -5 and +256 are singletons as are some other objects like strings with one element or empty tuples. You must not rely on the optimization.


i see now, so i guess that's also why id() returns the same address for them as well... i'll dive into the implementation file, it may be a bit out of my league but i'll see what i can gather, and hey, that's how it works, right? :-)

thanks

ariel
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to