Larry Hastings <la...@hastings.org> added the comment:
I think stringized annotations should prohibit the same things PEP 649 prohibits: walrus, yield / yield from, and await. This was easy in my 649 branch; walrus adds locals, and yield / yield from make it a generator. So the code raises an error if the generated annotations code object has locals or is a generator. I don't think I had to do anything special to prohibit await, because that's only valid in a function declared "async def", which annotations code objects are not. ---------- _______________________________________ 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