[Python-ideas] PEP 572: Statement-Local Name Bindings, take three!
Guido van Rossum
guido at python.org
Sun Mar 25 11:24:07 EDT 2018
On Sun, Mar 25, 2018 at 12:18 AM, Chris Angelico <rosuav at gmail.com> wrote:
> [...]
> Agreed. I'm currently thinking that I need to do what several people
> have suggested and break this into two completely separate PEPs:
>
> 1) Sublocal namespacing
> 2) Assignment expressions
>
> Sublocal names can be used in a number of ways. There could be a "with
> sublocal EXPR as NAME:" syntax that actually disposes of the name
> binding at the end of the block, and "except Exception as e:" could
> shadow rather than unbinding. Maybe list comprehensions could change,
> too - instead of creating a function, they just create a sublocal
> scope.
>
> That may be the best way forward. I'm not sure.
>
> ChrisA
>
I don't think the PEP should be split up into two PEPs. The two topics are
too closely related. But you can have separate discussions about each issue
in the PEP.
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180325/e3832884/attachment.html>
More information about the Python-ideas
mailing list