[3.14] Fix code example in annotationlib documentation (GH-136972) (#137002)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-07-22 18:15:27 +02:00 committed by GitHub
parent 591019e1f2
commit c328d140eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'}