[Python-3000] Draft PEP for outer scopes

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Nov 4 02:07:44 CET 2006


Ka-Ping Yee wrote:

>     nonlocal x = y = 0

I don't really like the idea of allowing assignment in
the nonlocal/global/whatever statement. It leads to
questions like what happens if some assignments in a
scope are qualified with nonlocal and others aren't.

Certainly answers can be given, but it's more
complexity in the rules and more to learn. If
declaration and assignment are kept separate, these
questions don't arise in the first place.

--
Greg


More information about the Python-3000 mailing list