PEP 563: Correct references to 3.10 default adoption (#2086)
This commit is contained in:
parent
40ef5625b7
commit
b9b44c4eb7
13
pep-0563.rst
13
pep-0563.rst
|
@ -25,7 +25,7 @@ This PEP proposes changing function annotations and variable annotations
|
|||
so that they are no longer evaluated at function definition time.
|
||||
Instead, they are preserved in ``__annotations__`` in string form.
|
||||
|
||||
This change is going to be introduced gradually, starting with a new
|
||||
This change is being introduced gradually, starting with a
|
||||
``__future__`` import in Python 3.7.
|
||||
|
||||
|
||||
|
@ -45,6 +45,8 @@ hinting use case:
|
|||
computationally free.
|
||||
|
||||
Postponing the evaluation of annotations solves both problems.
|
||||
NOTE: PEP 649 proposes an alternative solution to the above issues,
|
||||
putting this PEP in danger of being superceded.
|
||||
|
||||
Non-goals
|
||||
---------
|
||||
|
@ -85,7 +87,7 @@ aforementioned PEPs should be considered deprecated.
|
|||
Implementation
|
||||
==============
|
||||
|
||||
In Python 3.10, function and variable annotations will no longer be
|
||||
With this PEP, function and variable annotations will no longer be
|
||||
evaluated at definition time. Instead, a string form will be preserved
|
||||
in the respective ``__annotations__`` dictionary. Static type checkers
|
||||
will see no difference in behavior, whereas tools using annotations at
|
||||
|
@ -283,9 +285,10 @@ Deprecation policy
|
|||
Starting with Python 3.7, a ``__future__`` import is required to use the
|
||||
described functionality. No warnings are raised.
|
||||
|
||||
In Python 3.10 this will become the default behavior. Use of annotations
|
||||
incompatible with this PEP is no longer supported.
|
||||
|
||||
NOTE: Whether this will eventually become the default behavior is currently unclear
|
||||
pending decision on PEP 649. In any case, use of annotations that depend upon
|
||||
their eager evaluation is incompatible with both proposals and is no longer
|
||||
supported.
|
||||
|
||||
Forward References
|
||||
==================
|
||||
|
|
Loading…
Reference in New Issue