diff options
Diffstat (limited to 'Doc/library')
| -rw-r--r-- | Doc/library/dis.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index b74df0a3bc..0a64d4603b 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -607,6 +607,12 @@ iterations of the loop. .. versionadded:: 3.3 +.. opcode:: SETUP_ANNOTATIONS + + Checks whether ``__annotations__`` is defined in ``locals()``, if not it is + set up to an empty ``dict``. This opcode is only emmitted if a class + or module body contains :term:`variable annotations <variable annotation>` + statically. .. opcode:: IMPORT_STAR @@ -890,6 +896,11 @@ All of the following opcodes use their arguments. Deletes local ``co_varnames[var_num]``. +.. opcode:: STORE_ANNOTATION (namei) + + Stores TOS as ``locals()['__annotations__'][co_names[namei]] = TOS``. + + .. opcode:: LOAD_CLOSURE (i) Pushes a reference to the cell contained in slot *i* of the cell and free |
