About the implementation of del in Python 3
Gregory Ewing
greg.ewing at canterbury.ac.nz
Fri Jul 7 21:08:42 EDT 2017
Random832 wrote:
> What's not abstract is that if an object has address X and is N bytes
> long, those bytes (and any larger subobjects) occupy a contiguous range
> of addresses between X and X+(N-1).
If you're talking about Python objects, that's not necessarily
true -- there's no requirement that a Python object occupy a
contiguous range of machine addresses. In CPython, many don't,
e.g. strings.
Even for those that do, it's a range of *virtual* addresses,
which doeesn't necessarily correspond to contiguous physical
addresses, e.g. if it crosses a page boundary.
--
Greg
More information about the Python-list
mailing list