On Fri, Feb 14, 2014 at 9:24 PM, Rustom Mody <rustompm...@gmail.com> wrote: > In the case of physical objects like dice there is a fairly > unquestionable framing that makes identity straightforward -- > 4-dimensional space-time coordiantes. If the space-time coordinates of > 2 objects are all equal then the objects are identical, else not. > > Now we analogize the space-time identity of physical objects to > computer identity of computer objects (so-called) and all sorts of > problems ensue. > > 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. The language reference states, "Every object has an identity, a type and a value. An object's identity never changes once it has been created; you may think of it as the object's address in memory." Okay, so that quote does bring up memory address, but in my interpretation that's just an analogy to introduce the concept. The more important part of that sentence is the first part, which ties an object's identity to its creation. If two objects share the same creation, then they're the same object. -- https://mail.python.org/mailman/listinfo/python-list