Python for non-programmers

Donn Cave donn at u.washington.edu
Thu Mar 2 19:53:58 EST 2000


Quoth Steve Holden <sholden at bellatlantic.net>:
...
| Dealing with Icon, Python and similar languages it's a lot easier to
| teach to non-programmers by having the variables be fixed boxes which
| contain pointers to "values" which live "out there" (you don't want
| to start explaining heaps, stack frames, etc).
|
| An assignment is then just an optional creation of a new value (if
| it has an expression on the RHS) followed by an overwriting of the
| variable's contents with a pointer to the new value.

Could dictionaries be introduced right away, at a conceptual level,
while explaining variables?  It sounds like we're trying to come to
grips with something like ``existence of variables'', and along with
``what'' we need ``where'' to make existence mean anything.

I'm suggesting that the idea of the dictionary and its role in the
system should be introduced right away, especially for beginning
programmers, long before the dictionary as an object type.  Correct
notions of scope and references comes pretty naturally from this idea,
avoiding some common pitfalls.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list