summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2014-07-25 13:02:56 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2014-07-25 13:02:56 (GMT)
commitefd5df9e5267fd337cde95b0dec319ea59187bf4 (patch)
treeaa20c9a774303b891ac047721b8e036e94988578 /Doc
parentd0d64cfb59dda1b82e4ec05160f20316be75760d (diff)
downloadcpython-efd5df9e5267fd337cde95b0dec319ea59187bf4.zip
cpython-efd5df9e5267fd337cde95b0dec319ea59187bf4.tar.gz
cpython-efd5df9e5267fd337cde95b0dec319ea59187bf4.tar.bz2
Issue #21947: handle generator-iterator objects in dis
Patch by Clement Rouault.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/dis.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index fbabe35..8653da7 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -48,8 +48,8 @@ compiled code.
.. class:: Bytecode(x, *, first_line=None, current_offset=None)
- Analyse the bytecode corresponding to a function, method, string of
- source code, or a code object (as returned by :func:`compile`).
+ Analyse the bytecode corresponding to a function, generator, method,
+ string of source code, or a code object (as returned by :func:`compile`).
This is a convenience wrapper around many of the functions listed below,
most notably :func:`get_instructions`, as iterating over a
@@ -112,7 +112,7 @@ object isn't useful:
.. function:: code_info(x)
Return a formatted multi-line string with detailed code object information
- for the supplied function, method, source code string or code object.
+ for the supplied function, generator, method, source code string or code object.
Note that the exact contents of code info strings are highly implementation
dependent and they may change arbitrarily across Python VMs or Python
@@ -139,11 +139,11 @@ object isn't useful:
.. function:: dis(x=None, *, file=None)
Disassemble the *x* object. *x* can denote either a module, a class, a
- method, a function, a code object, a string of source code or a byte sequence
- of raw bytecode. For a module, it disassembles all functions. For a class,
- it disassembles all methods. For a code object or sequence of raw bytecode,
- it prints one line per bytecode instruction. Strings are first compiled to
- code objects with the :func:`compile` built-in function before being
+ method, a function, a generator, a code object, a string of source code or
+ a byte sequence of raw bytecode. For a module, it disassembles all functions.
+ For a class, it disassembles all methods. For a code object or sequence of
+ raw bytecode, it prints one line per bytecode instruction. Strings are first
+ compiled to code objects with the :func:`compile` built-in function before being
disassembled. If no object is provided, this function disassembles the last
traceback.