mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[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:
parent
591019e1f2
commit
c328d140eb
1 changed files with 1 additions and 1 deletions
|
|
@ -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'}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue