Objects in Python
invalid at invalid.invalid
Fri Aug 24 15:27:23 CEST 2012
On 2012-08-24, Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:
> On Fri, 24 Aug 2012 04:14:27 -0500, Evan Driscoll 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?
> No. The compiler remembers the address of 'a' by keeping notes about it
> somewhere in memory during the compilation process.
Ah, but as we are always fond of saying in this group "that's an
implementation detail, and not part of the language definition". The
model where a compiler is "keeping notes about it in Narnia" is also
perfectly valid. However, RAM is easier to find than magic wardrobes,
so the "notes" are usually kept in RAM these days.
Grant Edwards grant.b.edwards Yow! You mean you don't
at want to watch WRESTLING
gmail.com from ATLANTA?
More information about the Python-list