Skip to content

Commit c328d14

Browse files
[3.14] Fix code example in annotationlib documentation (GH-136972) (#137002)
Co-authored-by: Victorien <[email protected]>
1 parent 591019e commit c328d14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/annotationlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ code execution even with no access to any globals or builtins. For example:
511511
512512
>>> def f(x: (1).__class__.__base__.__subclasses__()[-1].__init__.__builtins__["print"]("Hello world")): pass
513513
...
514-
>>> annotationlib.get_annotations(f, format=annotationlib.Format.SOURCE)
514+
>>> annotationlib.get_annotations(f, format=annotationlib.Format.STRING)
515515
Hello world
516516
{'x': 'None'}
517517

0 commit comments

Comments
 (0)