[Python-ideas] PEP 572: Statement-Local Name Bindings
Nick Coghlan
ncoghlan at gmail.com
Sat Mar 3 02:04:08 EST 2018
On 3 March 2018 at 10:09, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Nick Coghlan wrote:
>
>> I don't think it should be possible to close over statement locals.
>>
>
> Why not?
I gave a more detailed answer to that in
https://mail.python.org/pipermail/python-ideas/2018-March/049138.html, but
the short version is:
* prohibiting closing over them opens up a lot of opportunities to simplify
the implementation
* prohibiting closing over them increase their semantic distance from
regular function locals, making it easier for people to answer the question
"Should I use a function local or a statement local?" in the future
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180303/e7f28f65/attachment.html>
More information about the Python-ideas
mailing list