diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-11-26 15:40:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 15:40:13 (GMT) |
commit | dcf629213bc046318c862ec0af5db3dfd1fc473a (patch) | |
tree | 95b5742a1fc2b20f4348d10746f7e520d75cde0d /Doc | |
parent | 2b0e2b2893a821ca36cd65a204bed932741ac189 (diff) | |
download | cpython-dcf629213bc046318c862ec0af5db3dfd1fc473a.zip cpython-dcf629213bc046318c862ec0af5db3dfd1fc473a.tar.gz cpython-dcf629213bc046318c862ec0af5db3dfd1fc473a.tar.bz2 |
gh-119180: Add VALUE_WITH_FAKE_GLOBALS format to annotationlib (#124415)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/annotationlib.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/annotationlib.rst b/Doc/library/annotationlib.rst index 3749045..dcaff3d 100644 --- a/Doc/library/annotationlib.rst +++ b/Doc/library/annotationlib.rst @@ -144,6 +144,17 @@ Classes The exact values of these strings may change in future versions of Python. + .. attribute:: VALUE_WITH_FAKE_GLOBALS + :value: 4 + + Special value used to signal that an annotate function is being + evaluated in a special environment with fake globals. When passed this + value, annotate functions should either return the same value as for + the :attr:`Format.VALUE` format, or raise :exc:`NotImplementedError` + to signal that they do not support execution in this environment. + This format is only used internally and should not be passed to + the functions in this module. + .. versionadded:: 3.14 .. class:: ForwardRef |