Is " a is b " and " id(a) == id(b) " the same?

Erik Max Francis max at
Sun Mar 16 08:44:03 CET 2003

Alex Martelli wrote:

> Not when they exist at the same time.  I think you failed to notice
> the crucial aspect in explaining the anomaly found by the original
> poster: that the method objects are being generated on the fly and
> go away at once, so the "exist at the same time" doesn't apply --
> their id can get recycled.

Ah, interesting.  Learn something new every day.

 Erik Max Francis / max at /
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ But since when can wounded eyes see / If we weren't who we were
\__/ Joi
    Blackgirl International /
 The Internet resource for black women.

More information about the Python-list mailing list