Explanation of list reference

Gregory Ewing greg.ewing at canterbury.ac.nz
Sun Feb 16 17:54:45 EST 2014
Chris Angelico wrote:
> Because everything in Python is an object, and objects always are
> handled by their references.

<beginner_thought> So, we have objects... and we have
references to objects... but everything is an object...
so does that mean references are objects too?
</beginner_thought>

This is the kind of trouble you get into when you make
a statement of the form "everything is an X"[1]. When
we say "everything is an object", we don't literally
mean everything, only... well, those things that *are*
objects. Which doesn't really help the beginner much.

[1] Mathematicians tried this. "Everything is a set!"
Yeah, right...

-- 
Greg



More information about the Python-list mailing list