About the implementation of del in Python 3

Chris Angelico rosuav at gmail.com
Thu Jul 6 12:13:54 EDT 2017


On Fri, Jul 7, 2017 at 12:59 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> Or you are using "address" in some abstract sense so that the "address"
>> does not change when the internal representation of the object is moved
>> to another location.
>
> "Address" is just a word. In fact, I don't think there is any definition
> in the Python data model that makes use of the term.
>
> Personally, when talking about Python, I would regard "address" as an
> endearing synonym for "identity".

Why? The word has a perfectly good meaning, and it's based on
"addressability". That is, you can take the address and use it to
locate the thing in question. I have an email address; you can use
that email address to send information to me. When you do, you'll get
in touch with the mail server by sending packets to its IP address,
and the internet's routing rules will get them where they need to go.
If you want to ship me physical items, you'll need to know my street
address, which tells you where in Australia you can find my letter
box. None of this has anything to do with my identity; I've had a
number of addresses of each type, and if you use an outdated one, you
won't get to me.

Objects have identities in Python even if they haven't yet been
assigned ID numbers. It's hard to probe this (impossible in CPython),
but you can see the effects of it by messing around in Jython.

ChrisA



More information about the Python-list mailing list