addressof object with id()

Chris Angelico rosuav at
Sun Mar 24 01:56:50 CET 2013

On Sun, Mar 24, 2013 at 11:49 AM, Dave Angel <davea at> wrote:
> You can assume that if the id's are equal, the objects are equal.  But you
> can't assume the inverse or the converse.

To be more specific: If the ids are equal, the objects are identical.
Doesn't mean they'll compare equal - for instance, float("nan") isn't
equal to itself. But for most situations, you can assume that
identical objects compare equal.


More information about the Python-list mailing list