Teaching python (programming) to children

Steve Holden sholden at holdenweb.com
Wed Nov 7 08:41:09 EST 2001


"Hung Jung Lu" <hungjunglu at yahoo.com> wrote ...
> huaiyu at gauss.almadan.ibm.com (Huaiyu Zhu) wrote >...
>
[...]
> > You are confused about the cause of this problem.
>
> I don't think so.
>
> > It is has nothing to do with namespace.
>
> Now you are confused. You think you can do Python without namespaces.
>
I don't believe Huaiyu was suggesting that you could "do Python without
namespaces". In so far as names have to live somewhere, clearly they are
necessary. Just the same, you should be careful, having found a hammer, not
to confuse all problems with a nail.

Object mutability is also an important aspect of the problem described.
Because the object is referred to by name does not make all problems
concerning it "namespace problems". And I am not, by the way, trying to
suggest that understanding namespaces isn't essential to a complete
understanding of Python. I am simply trying to suggest that, didactically
speaking, understanding cannot be complete instantly, and it is therefore
necessary to provide a staged set of comprehension levels for beginners. In
the early stages, unnecessary complications (those which don't improve
understanding) should be omitted.
>
> Experienced Python programmers always keep the three Python namespaces
> in mind. Matter of fact, many good Python programmers, including those
> that made Zope and hired Guido [:)], do tweak the built-in namespace
> once in a while. I guarantee you, once you have the namespace
> dictionaries picture inside your head, you won't need to use terms
> like "Python distinguishes between mutation and name-binding" and you
> won't run into namespace problems again. Once you understand the
> namespace dictionary mechanism, you'll see that all the three examples
> ('from xyz import *', 'global', and this one) I have mentioned all
> come from the lack of understanding of the namespace mechanism.
> Without understanding the namespace mechanism, you think they are
> three unrelated problems. (Missing the forest because of the trees, as
> they say in English, or, like blindmen touching the elephant, as they
> say in Chinese.) Once understood the namespace mechanism, you won't
> have any of these problems. Frankly, I don't think a person has
> understood Python until they have understood the namespace mechanism.
> My advise is: get to see the whole forest, or the whole elephant, or
> the whole Python. :)
>
The different problems have related caused, true. This does not mean that a
beginner shouod be confused by having full detail of the namespace
mechanisms thrust at them when all they need to do is bind values to a name
or two. Your use of the term "understanding" omits any comparative, implying
that there is only one level of understanding. We must find out many
individual facts about the elephant before we appreciate its true
complexity. In the meantime are we not allowed to use it to haul logs?

> However, that's not a task for beginners. Me having to spend 4
> postings on this thread should tell you something: many people don't
> see the whole Python.
>
I suspect it is more a measure of your determination to have this matter
thoroughly discussed. Would you like to go for 5 :-) ...?

> >feeling-exhausted-explaining-this-many-times-ly yr's
>
> Believe me, I am more exhausted than you are. :)
>
Newbies are easy. It's the old-timers who are hard to convince!

not-that-i-claim-to-be-one-ly y'rs  - steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list