Is 'everything' a refrence or isn't it?
Aahz
aahz at pythoncraft.com
Wed Jan 4 21:29:58 EST 2006
In article <43BC806A.1040201 at REMOVEMEcyber.com.au>,
Steven D'Aprano <steve at REMOVEMEcyber.com.au> wrote:
>
>Nonsense. What is stored in the list is an object. Python doesn't have
>pointers. You are confusing the underlying C implementation, which
>implements lists as an array of pointers, with the high-level Python
>code, which doesn't even know what a pointer is. It only has objects.
Wrong. Python has objects and targets. Names are a subset of targets.
A target is anything that can contain a binding (or reference, whichever
term you prefer) to an object; lists are arrays of targets.
No matter how you slice it ;-), a list does not actually hold objects, it
only holds references to objects.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"19. A language that doesn't affect the way you think about programming,
is not worth knowing." --Alan Perlis
More information about the Python-list
mailing list