Eric V. Smith <e...@trueblade.com> added the comment:

This isn't doing what you think. Because you throw away the object after 
computing its id, the same memory is reused and you get the same id.  Consider:

>>> a = [1,2,3]
>>> b = [3,4,5]
>>> id(a[:]) == id(b[:])
True

There's no problem here, but it does show that you need to be careful with "is" 
and "id".

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40565>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to