[Python-ideas] Modern language design survey for "assign and compare" statements

Chris Angelico rosuav at gmail.com
Fri May 18 22:14:04 EDT 2018

On Sat, May 19, 2018 at 12:11 PM, Greg Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> Chris Angelico wrote:
>> The 'as' syntax has been hammered out in great detail and is no longer
>> recommended due to its negative interactions with existing constructs.
> Allowing it in arbitrary expressions has been ruled out on
> the grounds that the difference between "with x as y:" and
> "with (x as y):" would be too subtle.
> But that argument doesn't apply if "as" becomes part of the
> syntax of "if" and "while". Do we think that's a bad idea
> as well?

Yes, largely because it's insufficient for all but a small handful of
situations. I mentioned that in the previous email.


More information about the Python-ideas mailing list