[issue38277] Allowing conditions with assignment expressions in comprehensions without parantheses

Guido van Rossum report at bugs.python.org
Wed Sep 25 14:33:45 EDT 2019


Guido van Rossum <guido at python.org> added the comment:

We're intentionally holding back on the places where we allow unparenthesized walrus operators.

There are some tricky issues in this particular bit of syntax -- look at this line in the grammar:
https://github.com/python/cpython/blob/bfd0c963d88f3df69489ee250655e2b8f3d235bd/Grammar/Grammar#L190

Because of that I would like to hold back on supporting this.

Is there a specific part of the docs that made you think this should be allowed?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38277>
_______________________________________


More information about the Python-bugs-list mailing list