what is the keyword "is" for?

Terry Reedy tjreedy at udel.edu
Tue Aug 15 10:01:36 EDT 2006


"Sybren Stuvel" <sybrenUSE at YOURthirdtower.com.imagination> wrote in message 
news:slrnee2sqi.qt8.sybrenUSE at schuimige.stuvel.eu...
> 'is' compares the object's addresses.

It actually compares the objects' integer identifiers.  That happens to be 
the linear memory address for CPython, but not necesarily so for other 
interpreters.

tjr






More information about the Python-list mailing list