Everything is an object in python - object class and type class

Michael Torrie torriem at gmail.com
Wed Jun 3 12:36:49 EDT 2015


On 06/03/2015 10:00 AM, BartC wrote:
> The others all give True in all cases. It seems that older Python 
> versions have a purer object model.

No.  It's just an under-the-hood optimization that the interpreter is
making.  It's an implementation detail that you should never rely on.
It says nothing about the purity of the object model.  Immutable objects
can be optimized ("interred" is the word often used) by reusing the same
object over and over when the interpreter can.




More information about the Python-list mailing list