How to Teach Python "Variables"

Donn Cave donn at
Tue Nov 27 18:50:23 CET 2007

In article 
<f5259aca-b49a-4ef2-9ab3-339f423ecae5 at>,
 Aaron Watters <aaron.watters at> wrote:

> I would try to avoid talking
> in generalities about python variables versus C or
> lisp or whatever, unless I was teaching an upper division
> college programming languages survey class.
> Instead, I'd fire up the interactive interpreter and
> illustrate how things work via examples, avoiding the
> weird cases at all costs.  If they ask about the
> relationship to C or java or whatever
> I would encourage them to not worry about it,
> and only go deeper if pressed.

I don't know if that explains enough on its own - I suppose
it depends on how ambitious your programmer is.  But the
key point is that by approaching it this way, you're teaching
them how to teach themselves as required:  write an example,
see what happens.  A programmer who does this by reflex and
remains confused about how the language works is, in my opinion,
not going to get very far anyway.  (This may have changed
somewhat in recent years as more esoteric junk has has been
stuffed into the language, I haven't really been keeping track.)
In contrast, I suspect that someone who learns Python concepts
in terms of explanations like `boxes' or `pointers' or whatnot
is at some disadvantage while that lasts, like translating a
foreign language to your own instead of attaching meaning

   Donn Cave, donn at

More information about the Python-list mailing list