https://github.com/python/cpython/commit/c13cc4af793ba4ae27521df1693653920cafbf99
commit: c13cc4af793ba4ae27521df1693653920cafbf99
branch: main
author: Victorien <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2025-07-22T13:48:02Z
summary:
Fix code example in `annotationlib` documentation (#136972)
files:
M Doc/library/annotationlib.rst
diff --git a/Doc/library/annotationlib.rst b/Doc/library/annotationlib.rst
index 7dfc11449a6cbc..981d89be7d58d6 100644
--- a/Doc/library/annotationlib.rst
+++ b/Doc/library/annotationlib.rst
@@ -511,7 +511,7 @@ code execution even with no access to any globals or
builtins. For example:
>>> def f(x:
(1).__class__.__base__.__subclasses__()[-1].__init__.__builtins__["print"]("Hello
world")): pass
...
- >>> annotationlib.get_annotations(f, format=annotationlib.Format.SOURCE)
+ >>> annotationlib.get_annotations(f, format=annotationlib.Format.STRING)
Hello world
{'x': 'None'}
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]