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

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 18 22:11:38 EDT 2018


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?

 From the survey of other modern languages that was just
posted, it seems we'd be in good company if adopted something
like that.

-- 
Greg


More information about the Python-ideas mailing list