mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #26733: Disassembling a class now disassembles class and static methods.
Patch by Xiang Zhang.
This commit is contained in:
parent
21ce717eaf
commit
585c93daea
4 changed files with 60 additions and 8 deletions
|
@ -139,11 +139,11 @@ operation is being performed, so the intermediate analysis object isn't useful:
|
|||
Disassemble the *x* object. *x* can denote either a module, a class, a
|
||||
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.
|
||||
For a class, it disassembles all methods (including class and static 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.
|
||||
|
||||
The disassembly is written as text to the supplied *file* argument if
|
||||
provided and to ``sys.stdout`` otherwise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue