About the implementation of del in Python 3

Chris Angelico rosuav at gmail.com
Fri Jul 7 05:06:45 EDT 2017


On Fri, Jul 7, 2017 at 6:58 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Steve D'Aprano <steve+python at pearwood.info>:
>
>> But the Python virtual machine doesn't require objects to have an
>> address at all.
>
> That's an interesting question. Is it possible to define formal
> semantics for Python without the notion of an address (under some name)?
> Ultimately it seems necessary to have an enumerable set (address space)
> that maps to objects.

Yes, it most definitely is. I have explained Python's object model on
the kitchen table, using sheets of paper, and pencil lines/arrows
representing references. Aside from being tedious, and being
vulnerable to an accidental brush of the sleeve, this is a fully
compliant Python interpreter. (And when we were done, the entire heap
was garbage collected simultaneously.)

ChrisA



More information about the Python-list mailing list