Explanation of list reference
ian.g.kelly at gmail.com
Sat Feb 15 09:08:07 CET 2014
On Fri, Feb 14, 2014 at 11:07 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> On Saturday, February 15, 2014 10:50:35 AM UTC+5:30, Ian wrote:
>> 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.
> Whats the notion of object identity is the question.
> Ok so you reject the memory addr as an 'implementation detail'
> Then you are obliged to provide some other way of understanding object-identity
I thought that I did. Repeating myself from what you quoted above:
If two objects share the same creation, then they're the same object.
More information about the Python-list