On Sat, Feb 15, 2014 at 4:20 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
> On Fri, Feb 14, 2014 at 9:24 PM, Rustom Mody <rustompm...@gmail.com> wrote:
>> To start with we say two objects are identical if they have the same
>> memory address.
>
> This is false.  It happens to hold for CPython, but that's an
> implementation detail.  The definition of object identity does not
> depend on memory address.  It also doesn't have anything to do with
> space-time coordinates.  The concept of object identity is an
> abstraction, not an analogy from physics.

With the restrictions of computer memory, I suspect that two objects
with the same address must be identical, simply because it's not
possible for it to be otherwise. However, the converse isn't
necessarily true; two objects may have the same identity while being
at different addresses (or, more likely, one object may occupy
different memory addresses over time, if the gc moves it around). But
since memory addresses are completely inaccessible to Python code, we
can't say whether two objects have the same address.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to