diff -r 7ed8a9f9831d Doc/library/dis.rst --- a/Doc/library/dis.rst Wed Feb 05 13:42:29 2014 +0200 +++ b/Doc/library/dis.rst Wed Feb 05 14:42:17 2014 +0100 @@ -502,7 +502,7 @@ Implements the expression statement for the interactive mode. TOS is removed from the stack and printed. In non-interactive mode, an expression statement is - terminated with ``POP_STACK``. + terminated with :opcode:`POP_TOP`. .. opcode:: BREAK_LOOP @@ -513,7 +513,7 @@ .. opcode:: CONTINUE_LOOP (target) Continues a loop due to a :keyword:`continue` statement. *target* is the - address to jump to (which should be a ``FOR_ITER`` instruction). + address to jump to (which should be a :opcode:`FOR_ITER` instruction). .. opcode:: SET_ADD (i) @@ -543,12 +543,12 @@ .. opcode:: YIELD_VALUE - Pops ``TOS`` and yields it from a :term:`generator`. + Pops TOS and yields it from a :term:`generator`. .. opcode:: YIELD_FROM - Pops ``TOS`` and delegates to it as a subiterator from a :term:`generator`. + Pops TOS and delegates to it as a subiterator from a :term:`generator`. .. versionadded:: 3.3 @@ -584,7 +584,7 @@ .. opcode:: LOAD_BUILD_CLASS Pushes :func:`builtins.__build_class__` onto the stack. It is later called - by ``CALL_FUNCTION`` to construct a class. + by :opcode:`CALL_FUNCTION` to construct a class. .. opcode:: SETUP_WITH (delta) @@ -615,7 +615,7 @@ If the stack represents an exception, *and* the function call returns a 'true' value, this information is "zapped" and replaced with a single - ``WHY_SILENCED`` to prevent ``END_FINALLY`` from re-raising the exception. + ``WHY_SILENCED`` to prevent :opcode:`END_FINALLY` from re-raising the exception. (But non-local gotos will still be resumed.) .. XXX explain the WHY stuff! @@ -627,8 +627,8 @@ .. opcode:: STORE_NAME (namei) Implements ``name = TOS``. *namei* is the index of *name* in the attribute - :attr:`co_names` of the code object. The compiler tries to use ``STORE_FAST`` - or ``STORE_GLOBAL`` if possible. + :attr:`co_names` of the code object. The compiler tries to use :opcode:`STORE_FAST` + or :opcode:`STORE_GLOBAL` if possible. .. opcode:: DELETE_NAME (namei) @@ -668,12 +668,12 @@ .. opcode:: STORE_GLOBAL (namei) - Works as ``STORE_NAME``, but stores the name as a global. + Works as :opcode:`STORE_NAME`, but stores the name as a global. .. opcode:: DELETE_GLOBAL (namei) - Works as ``DELETE_NAME``, but deletes a global name. + Works as :opcode:`DELETE_NAME`, but deletes a global name. .. opcode:: LOAD_CONST (consti) @@ -694,12 +694,12 @@ .. opcode:: BUILD_LIST (count) - Works as ``BUILD_TUPLE``, but creates a list. + Works as :opcode:`BUILD_TUPLE`, but creates a list. .. opcode:: BUILD_SET (count) - Works as ``BUILD_TUPLE``, but creates a set. + Works as :opcode:`BUILD_TUPLE`, but creates a set. .. opcode:: BUILD_MAP (count) @@ -724,7 +724,7 @@ Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide the *fromlist* and *level* arguments of :func:`__import__`. The module object is pushed onto the stack. The current namespace is not affected: - for a proper import statement, a subsequent ``STORE_FAST`` instruction + for a proper import statement, a subsequent :opcode:`STORE_FAST` instruction modifies the namespace. @@ -732,7 +732,7 @@ Loads the attribute ``co_names[namei]`` from the module found in TOS. The resulting object is pushed onto the stack, to be subsequently stored by a - ``STORE_FAST`` instruction. + :opcode:`STORE_FAST` instruction. .. opcode:: JUMP_FORWARD (delta) @@ -769,9 +769,9 @@ .. opcode:: FOR_ITER (delta) - ``TOS`` is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. + TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If this yields a new value, push it on the stack (leaving the iterator below - it). If the iterator indicates it is exhausted ``TOS`` is popped, and the + it). If the iterator indicates it is exhausted TOS is popped, and the byte code counter is incremented by *delta*. @@ -911,21 +911,21 @@ .. opcode:: CALL_FUNCTION_VAR (argc) - Calls a function. *argc* is interpreted as in ``CALL_FUNCTION``. The top element + Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The top element on the stack contains the variable argument list, followed by keyword and positional arguments. .. opcode:: CALL_FUNCTION_KW (argc) - Calls a function. *argc* is interpreted as in ``CALL_FUNCTION``. The top element + Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The top element on the stack contains the keyword arguments dictionary, followed by explicit keyword and positional arguments. .. opcode:: CALL_FUNCTION_VAR_KW (argc) - Calls a function. *argc* is interpreted as in ``CALL_FUNCTION``. The top + Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The top element on the stack contains the keyword arguments dictionary, followed by the variable-arguments tuple, followed by explicit keyword and positional arguments.