How to Teach Python "Variables"

Aaron Watters aaron.watters at gmail.com
Tue Nov 27 11:25:55 EST 2007


On Nov 27, 10:06 am, hdante <hda... at gmail.com> wrote:
> On Nov 25, 5:31 pm, none <""atavory\"@(none)"> wrote:
....
>  And that's it. I think that there is confusion because everything we
> do with python variables are pointer dereferences, except for the
> attribution, that instead of dereferencing and operating the object,
> just changes the pointer. The scope is just a matter of using
> automatic memory management or not.

I hope the participants in this thread realize
that this sort of discussion will cause
any programming newbie to immediately melt into the
floor.

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.

BTW, at the moment I'm "facilitating" an online
C# class for fun and a very little profit in my
spare time.  I'm becoming quite convinced that
especially the beginning programmers would have far
less difficulty with Python, largely because
there is less syntactic noise to confuse them and
because they can fiddle around with everything
up to and including advanced concepts using simple
examples at the interactive prompt.

But if you talk like the above to them, they
will run for the hills... (no offense intended).

  -- Aaron Watters

===
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=evil+fish




More information about the Python-list mailing list