[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

About the implementation of del in Python 3

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.)