On Fri, Jan 5, 2018, at 14:07, Guido van Rossum wrote: > Yeah, but I've changed my mind on this -- I think it's needless added > complexity that helps save one line of code in very few use cases. And you > don't really think the PEP endorses `nonlocal foo += 1` do you?
The PEP itself is very clear about supporting "augmented assignment", even defining the grammar differently for this case (such that you can't do it with multiple names in a single statement). The grammar shown also supports "nonlocal foo = bar = baz", though the text doesn't mention this form. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com