mirror of https://github.com/python/cpython
gh-92417: `typing` docs: `from __future__ import annotations` can be used in all supported Python versions (GH-92418)
(cherry picked from commit e5b4bd4d60
)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
d0d22ca9fb
commit
a85bdd7e02
|
@ -2668,7 +2668,7 @@ Constant
|
|||
|
||||
.. note::
|
||||
|
||||
If ``from __future__ import annotations`` is used in Python 3.7 or later,
|
||||
If ``from __future__ import annotations`` is used,
|
||||
annotations are not evaluated at function definition time.
|
||||
Instead, they are stored as strings in ``__annotations__``.
|
||||
This makes it unnecessary to use quotes around the annotation
|
||||
|
|
Loading…
Reference in New Issue