Ka-Ping Yee <[EMAIL PROTECTED]> wrote:
> A shorthand form is also permitted, in which ``nonlocal`` is
> prepended to an assignment or augmented assignment statement::
>
> nonlocal x = 3
>
> The above has exactly the same meaning as ``nonlocal x; x = 3``.
Nice.
> The shorthand form does not allow multiple names.
As you allow
nonlocal x, y, z
and
x, y, z = 1, 2, 3
is legal Python (and does the right thing), why not allow
nonlocal x, y, z = 1, 2, 3
too?
That's one less rule needed to be learned and enforced.
--
Christian Tanzer http://www.c-tanzer.at/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com