@@ -127,34 +127,34 @@ Classes
127
127
128
128
Values are the result of evaluating the annotation expressions.
129
129
130
- .. attribute :: FORWARDREF
130
+ .. attribute :: VALUE_WITH_FAKE_GLOBALS
131
131
:value: 2
132
132
133
+ Special value used to signal that an annotate function is being
134
+ evaluated in a special environment with fake globals. When passed this
135
+ value, annotate functions should either return the same value as for
136
+ the :attr: `Format.VALUE ` format, or raise :exc: `NotImplementedError `
137
+ to signal that they do not support execution in this environment.
138
+ This format is only used internally and should not be passed to
139
+ the functions in this module.
140
+
141
+ .. attribute :: FORWARDREF
142
+ :value: 3
143
+
133
144
Values are real annotation values (as per :attr: `Format.VALUE ` format)
134
145
for defined values, and :class: `ForwardRef ` proxies for undefined
135
146
values. Real objects may contain references to :class: `ForwardRef `
136
147
proxy objects.
137
148
138
149
.. attribute :: STRING
139
- :value: 3
150
+ :value: 4
140
151
141
152
Values are the text string of the annotation as it appears in the
142
153
source code, up to modifications including, but not restricted to,
143
154
whitespace normalizations and constant values optimizations.
144
155
145
156
The exact values of these strings may change in future versions of Python.
146
157
147
- .. attribute :: VALUE_WITH_FAKE_GLOBALS
148
- :value: 4
149
-
150
- Special value used to signal that an annotate function is being
151
- evaluated in a special environment with fake globals. When passed this
152
- value, annotate functions should either return the same value as for
153
- the :attr: `Format.VALUE ` format, or raise :exc: `NotImplementedError `
154
- to signal that they do not support execution in this environment.
155
- This format is only used internally and should not be passed to
156
- the functions in this module.
157
-
158
158
.. versionadded :: 3.14
159
159
160
160
.. class :: ForwardRef
0 commit comments