Explanation of list reference
On Sun, 16 Feb 2014 18:43:15 -0500, Roy Smith wrote:
> In article <mailman.7074.1392591962.18130.python-list at python.org>,
> Ben Finney <ben+python at benfinney.id.au> wrote:
>> Gregory Ewing <greg.ewing at canterbury.ac.nz> writes:
>> > 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>
>> My response: No, because references are not things :-)
>> I've never known a programming beginner to express such a question.
>> Have you?
> You make light of Gregory's point, but he's right. That's exactly the
> kind of thing a beginner would get confused about.
I take it that you haven't spent much time around beginners? Perhaps you
should spend some time on the "tutor" mailing list. If you do, you will
see very few abstract or philosophical questions such as whether
references are themselves things or what identity means. But you will
find plenty of questions about:
- "Will you do my homework for me?"
- "What's this syntax error mean?" (very rarely with the syntax
error actually shown)
- confusion about the fundamentals of sequential algorithms, e.g.
asking why this loop always prints the same value forever:
var = random.randint(1, 10)
while var != 10:
and similar sorts of *concrete* problems.
Just about the only abstract question that I've seen from beginners is
the question "What's object oriented programming?" In my experience,
people don't start asking abstract questions until they've been
programming for a few years.