For what its worth, I'm +1 on it.
I actually like that it would allow:
while (something() as var): something_else(var)
...without being a bug magnet. The bug magnet isn't the assignment of a name in the condition of a while loop, it's the fact that assignment is a simple typo away from comparison. This is not a simple typo away from comparison (the operands are a different order, too).
(sorry Chris, I didn't hit reply all the first time.)
-----Original Message----- From: Python-ideas [mailto:python-ideas-bounces+tritium- email@example.com] On Behalf Of Chris Angelico Sent: Wednesday, February 28, 2018 3:01 PM To: python-ideas firstname.lastname@example.org Subject: Re: [Python-ideas] PEP 572: Statement-Local Name Bindings
On Thu, Mar 1, 2018 at 6:54 AM, Brett Cannon email@example.com wrote:
Thanks for taking the time to write this PEP, Chris, even though I'm -1
the idea. I'm glad to just have this as a historical document for the
I'm going to get a reputation for writing up PEPs for dead ideas. PEP 463 (exception-catching expressions) was the same. In this particular case, I'm fairly in favour of it, but only because I think it's cool - not because I have actual need for it - and if the PEP's rejected, so be it.
ChrisA _______________________________________________ Python-ideas mailing list Pythonfirstname.lastname@example.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/