Guido van Rossum <gu...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue42725> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com