Is it me or a python wart

Robin Becker robin at jessikat.fsnet.co.uk
Mon Apr 29 18:18:08 EDT 2002


In article <b0f083db.0204290751.52c145f4 at posting.google.com>, Jeremy
Hylton <jeremy at alum.mit.edu> writes
......
>LOAD_NAME is an old-fashioned beast that looks in the current
>namespace, the global namespace, and the builtin namespace.  It never
>raises an exception unless the name can't be found in any of those
>namespaces. Note in particular that it's always three namespaces; in
>the case of a nested block, enclosing namespaces are not searched.
.....
thanks, but my primitive investigations didn't reveal any LOAD_NAME ops.
The one op I saw was LOAD_CLOSURE, but of course I'm not really sure
what I'm seeing with this.


>This stuff isn't documented, so it's no surprise that it's confusing. 
>But I think the documentation will mostly be of the form:  The results
>of XXX are undefined.  (The CPython implements currently does this
>...)
>
>Jeremy
the one thing I think is that other languages eg pascal/modula have a
better/simpler grasp of what humans see in programs. Lexical scope ie
higher on the page and further left means precede is a 'good' rule. The
'local' idea that anything that is assigned to is 'local' is much harder
since that can be realised very distantly. I assume there are reasons
for the current 'oddness', but they seem to be hidden from us poor
lusers.
-- 
Robin Becker



More information about the Python-list mailing list