[issue42725] PEP 563: Should the behavior change for yield/yield from's
Guido van Rossum
report at bugs.python.org
Fri Apr 23 22:21:41 EDT 2021
Guido van Rossum <guido at python.org> added the comment:
So shouldn't we just rule out some specific bits of syntax in annotations? That can be done after the PEG grammar has accepted them, otherwise we'd end up having a whole new expression-like grammar section that excludes them. I think this is the list we should exclude, right?
- yield [from]
- walrus
- await (?)
I agree await technically doesn't need to be in this list, so maybe we shouldn't explicitly exclude it -- it's no different than writing
def f(x: open(filename).read()):
...
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42725>
_______________________________________
More information about the Python-bugs-list
mailing list