Issue #26733: Disassembling a class now disassembles class and static methods.

Patch by Xiang Zhang.
This commit is contained in:
Serhiy Storchaka 2016-04-23 09:23:52 +03:00
parent 21ce717eaf
commit 585c93daea
4 changed files with 60 additions and 8 deletions

View file

@ -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.