Why read-only nested scopes?
Skip Montanaro
skip at pobox.com
Wed Sep 4 14:37:07 EDT 2002
Gonçalo> So why hasn't this been extended when nested scopes were
Gonçalo> introduced, e.g. by reusing the global directive or some other
Gonçalo> one?
Martin> I think the main reason is that nobody could propose an
Martin> acceptable syntax. Reusing the global directive does not work.
For the gory details, read PEP 227:
http://www.python.org/peps/pep-0227.html
especially the section entitled "Rebinding names in enclosing scopes".
--
Skip Montanaro
skip at pobox.com
consulting: http://manatee.mojam.com/~skip/resume.html
More information about the Python-list
mailing list