How to Teach Python "Variables"

MonkeeSage MonkeeSage at
Tue Nov 27 20:20:40 CET 2007

On Nov 27, 11:50 am, Donn Cave <d... at> wrote:

> 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
> directly.

I agree with your point, but I think the distinction is this:
pedagogical analogies should be truly *analogous* -- they should not
be "analogies" that are only vaguely similar and require you to
constantly say "...but ignore this difference and that
difference...oh, and that'll learn that later." I personally
think the "ignore this for now" approach is detrimental. An example of
a real analogy, which is very useful (imho), is in regards to C
pointers. The analogy is to a real pointing device (nowadays, probably
a laser pointer). The pointer (pointing device) is one thing, and it
takes up its own dimensions of space; but it can point to something
else, and that something takes up its own dimensions as well. They are
not interchangeable;  they have their own identities. But by following
the pointer to the something else, and interpreting that something
according to its own nature (text, a picture, &c), you can find the
"value" of the pointer. The pointer merely "references" that value.
And you can exchange the value that is referred to with any other
value of the same nature. You can, for example, point to a line of
code on an overhead projector. Then you can change the slide. Now the
value of the reference has changed, but the reference is the same. And
you can go one step further and point at an arrow symbol, which in
turn points to some other value in the context; the value turns out to
be another pointer which can be followed to it's own meaning. Granted,
it's an analogy, but I think it's a *good* analogy rather than a bad
one; it helps map the meaning to familiar objects, rather than the
trappings of the familiar preventing from grasping the concept.


More information about the Python-list mailing list