Clarify 649 wrt annotations inside flow control.

This commit is contained in:
Larry Hastings 2021-01-11 16:14:32 -08:00
parent 33b7bdcf94
commit 9a4b7c6071
1 changed files with 6 additions and 5 deletions

View File

@ -239,11 +239,12 @@ The good news is, neither is common, and neither is considered good
practice. In fact, they're rarely seen outside of Python's own
regression test suite. They are:
* *Code that sets annotations from inside any kind of
flow control statement.* It's currently possible to set
module and class attributes with annotations inside an
``if`` or ``try`` statement, and it works as one would expect.
It's untenable to support this behavior when this PEP is active.
* *Code that sets annotations on module or class attributes
from inside any kind of flow control statement.* It's
currently possible to set module and class attributes with
annotations inside an ``if`` or ``try`` statement, and it works
as one would expect. It's untenable to support this behavior
when this PEP is active.
* *Code in module or class scope that references or modifies the
local* ``__annotations__`` *dict directly.* Currently, when
setting annotations on module or class attributes, the generated