[Python-ideas] PEP 572: Assignment Expressions (post #4)
Alex Walters
tritium-list at sdamon.com
Fri Apr 13 00:32:49 EDT 2018
>
> On the third hand, requiring parentheses all the time would also feel
> strained:
>
> while m := someregexp.match(somestring):
>
> is already impossible to misread.
>
> Annoying ;-)
While adding parens to that would be superfluous for the reader of the
module, as a tradeoff for requiring explicitness instead of doing the
implicitly wrong (depending on context) thing is probably worth it.
More information about the Python-ideas
mailing list