mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.14] gh-119180: annotationlib: Fix values of Format members in docs (GH-133841) (#133903)
gh-119180: annotationlib: Fix values of Format members in docs (GH-133841)
(cherry picked from commit 0eb448cae5
)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
a3475e68bb
commit
94938caf35
1 changed files with 18 additions and 18 deletions
|
@ -127,25 +127,8 @@ Classes
|
||||||
|
|
||||||
Values are the result of evaluating the annotation expressions.
|
Values are the result of evaluating the annotation expressions.
|
||||||
|
|
||||||
.. attribute:: FORWARDREF
|
|
||||||
:value: 2
|
|
||||||
|
|
||||||
Values are real annotation values (as per :attr:`Format.VALUE` format)
|
|
||||||
for defined values, and :class:`ForwardRef` proxies for undefined
|
|
||||||
values. Real objects may contain references to :class:`ForwardRef`
|
|
||||||
proxy objects.
|
|
||||||
|
|
||||||
.. attribute:: STRING
|
|
||||||
:value: 3
|
|
||||||
|
|
||||||
Values are the text string of the annotation as it appears in the
|
|
||||||
source code, up to modifications including, but not restricted to,
|
|
||||||
whitespace normalizations and constant values optimizations.
|
|
||||||
|
|
||||||
The exact values of these strings may change in future versions of Python.
|
|
||||||
|
|
||||||
.. attribute:: VALUE_WITH_FAKE_GLOBALS
|
.. attribute:: VALUE_WITH_FAKE_GLOBALS
|
||||||
:value: 4
|
:value: 2
|
||||||
|
|
||||||
Special value used to signal that an annotate function is being
|
Special value used to signal that an annotate function is being
|
||||||
evaluated in a special environment with fake globals. When passed this
|
evaluated in a special environment with fake globals. When passed this
|
||||||
|
@ -155,6 +138,23 @@ Classes
|
||||||
This format is only used internally and should not be passed to
|
This format is only used internally and should not be passed to
|
||||||
the functions in this module.
|
the functions in this module.
|
||||||
|
|
||||||
|
.. attribute:: FORWARDREF
|
||||||
|
:value: 3
|
||||||
|
|
||||||
|
Values are real annotation values (as per :attr:`Format.VALUE` format)
|
||||||
|
for defined values, and :class:`ForwardRef` proxies for undefined
|
||||||
|
values. Real objects may contain references to :class:`ForwardRef`
|
||||||
|
proxy objects.
|
||||||
|
|
||||||
|
.. attribute:: STRING
|
||||||
|
:value: 4
|
||||||
|
|
||||||
|
Values are the text string of the annotation as it appears in the
|
||||||
|
source code, up to modifications including, but not restricted to,
|
||||||
|
whitespace normalizations and constant values optimizations.
|
||||||
|
|
||||||
|
The exact values of these strings may change in future versions of Python.
|
||||||
|
|
||||||
.. versionadded:: 3.14
|
.. versionadded:: 3.14
|
||||||
|
|
||||||
.. class:: ForwardRef
|
.. class:: ForwardRef
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue