summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-08-18 05:04:45 (GMT)
committerRaymond Hettinger <python@rcn.com>2015-08-18 05:04:45 (GMT)
commit5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3 (patch)
tree4bb326ec6a4e0bdac1585d09db97611f905ee29a /Lib/dis.py
parent02aa3426d393642999bb4f0e1a3125b9391ca399 (diff)
downloadcpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.zip
cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.gz
cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.bz2
Issue #24878: Add docstrings to selected namedtuples
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index af37cdf..3540b47 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -162,6 +162,15 @@ def show_code(co, *, file=None):
_Instruction = collections.namedtuple("_Instruction",
"opname opcode arg argval argrepr offset starts_line is_jump_target")
+_Instruction.opname.__doc__ = "Human readable name for operation"
+_Instruction.opcode.__doc__ = "Numeric code for operation"
+_Instruction.arg.__doc__ = "Numeric argument to operation (if any), otherwise None"
+_Instruction.argval.__doc__ = "Resolved arg value (if known), otherwise same as arg"
+_Instruction.argrepr.__doc__ = "Human readable description of operation argument"
+_Instruction.offset.__doc__ = "Start index of operation within bytecode sequence"
+_Instruction.starts_line.__doc__ = "Line started by this opcode (if any), otherwise None"
+_Instruction.is_jump_target.__doc__ = "True if other code jumps to here, otherwise False"
+
class Instruction(_Instruction):
"""Details for a bytecode operation