list.clear() missing?!?
Sergei Organov
osv at javad.com
Fri Apr 14 01:17:05 EDT 2006
Peter Hansen <peter at engcorp.com> writes:
[...]
> Then it's a good reason we had this thread, so you could learn something
> *crucial* to understanding Python and writing non-buggy code: name
> binding versus variables which occupy fixed memory locations like in
> some other languages. This has to be by far the most frequent area that
> newcomer's trip up. But that's another story...
I, as a newcomer, don't have much trouble understanding the binding vs
the assignment by themselves. What does somewhat confuse is dual role of
the "=" operator, -- sometimes it means "bind" and other times it means
"assign", right? For me it seems that the language would be less
error-prone and easier to grok if these two operations had different
names/syntax (thinking about lisp "let" vs "set"), though it seems to be
too drastic change even for Python3000.
-- Sergei.
More information about the Python-list
mailing list