bruno.desthuilli...@gmail.com wrote:
On 16 déc, 12:55, Jean-Michel Pichavant <jeanmic...@sequans.com>
wrote:
id('foo')
3082385472L
id('foo')
3082385472L

Anyone has that kind of code ?

2 points:


1- an id is only valid for the lifetime of a given object - when the
object has been collected, the id can be reused for another object.

that's exactly what happened in my example, the 2 'foo' are not the same object actually, the fact that the 2 successive id() calls return the same value is implementation specific.
Thanks for pointing that out, I didn't realize in the first place.

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

Reply via email to