Thanks to all, but :
- I should have said that I work with Python 3. Does that matter ?
- May I reformulate the queston : "a is b" and "id(a) == id(b)"
  both mean : "a et b share the same physical address". Is that True ?
Thanks,

    franck

In article <mailman.213.1346827305.27098.python-l...@python.org>,
 Benjamin Kaplan <benjamin.kap...@case.edu> wrote:

> On Tue, Sep 4, 2012 at 11:30 PM, Franck Ditter <fra...@ditter.org> wrote:
> > Hi !
> > a is b <==> id(a) == id(b) in builtin classes.
> > Is that true ?
> > Thanks,
> >
> >     franck
> 
> No. It is true that if a is b then id(a) == id(b) but the reverse is
> not necessarily true. id is only guaranteed to be unique among objects
> alive at the same time. If objects are discarded, their ids may be
> reused even though the objects are not the same.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to