Objects in Python

wu wei wuwei23 at gmail.com
Fri Aug 24 07:49:38 EDT 2012


On Fri, Aug 24, 2012 at 7:14 PM, Evan Driscoll <driscoll at cs.wisc.edu> wrote:

> On 8/23/2012 22:17, alex23 wrote:
> > But Roy's point was that referring to 'a' as a 'variable' makes no
> > sense, as it's not an allocated piece of memory.
>
> Does the computer just remember what 'a' refers to by keeping notes
> about it in Narnia?
>

You're correct. It will be, on some level, a piece of memory. But I don't
recall seeing any guarantee that the memory used to hold the dictionary key
of 'a' in one scope would be re-used if 'a' was first deleted and then
re-created. It's an implementation detail about the language that we don't
care about.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120824/1c1bdbbb/attachment.html>


More information about the Python-list mailing list