From 4ee49985194712507eeede781d24800fd7fe2c25 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 11 Mar 2023 12:42:26 +0300 Subject: [PATCH 1/2] gh-101100: [docs] Fix Sphinx warnings in `dis` module --- Doc/library/dis.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index f4f47b3bf4846d..50c6fa0b51fd42 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -43,13 +43,13 @@ interpreter. adaptive bytecode can be shown by passing ``adaptive=True``. -Example: Given the function :func:`myfunc`:: +Example: Given the function ``myfunc``:: def myfunc(alist): return len(alist) the following command can be used to display the disassembly of -:func:`myfunc`: +``myfunc``: .. doctest:: @@ -792,7 +792,7 @@ iterations of the loop. .. opcode:: LOAD_BUILD_CLASS - Pushes :func:`builtins.__build_class__` onto the stack. It is later called + Pushes :func:`!builtins.__build_class__` onto the stack. It is later called to construct a class. @@ -850,13 +850,13 @@ iterations of the loop. .. opcode:: STORE_NAME (namei) Implements ``name = STACK.pop()``. *namei* is the index of *name* in the attribute - :attr:`co_names` of the code object. The compiler tries to use + :attr:`!codeobject.co_names` of the code object. The compiler tries to use :opcode:`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible. .. opcode:: DELETE_NAME (namei) - Implements ``del name``, where *namei* is the index into :attr:`co_names` + Implements ``del name``, where *namei* is the index into :attr:`!codeobject.co_names` attribute of the code object. @@ -895,7 +895,7 @@ iterations of the loop. value = STACK.pop() obj.name = value - where *namei* is the index of name in :attr:`co_names`. + where *namei* is the index of name in :attr:`!codeobject.co_names`. .. opcode:: DELETE_ATTR (namei) @@ -904,7 +904,7 @@ iterations of the loop. obj = STACK.pop() del obj.name - where *namei* is the index of name into :attr:`co_names`. + where *namei* is the index of name into :attr:`!codeobject.co_names`. .. opcode:: STORE_GLOBAL (namei) From 38878498ac9d412ea8dec4a50c544fa644c5bc56 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 7 Jun 2023 09:26:57 +0300 Subject: [PATCH 2/2] Update Doc/library/dis.rst Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Doc/library/dis.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 997d3a6fdcca3f..f84a9379de849b 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -857,7 +857,7 @@ iterations of the loop. .. opcode:: DELETE_NAME (namei) - Implements ``del name``, where *namei* is the index into :attr:`!codeobject.co_names` + Implements ``del name``, where *namei* is the index into :attr:`!co_names` attribute of the code object.