diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-23 09:24:29 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-23 09:24:29 +0300 |
commit | 8b9eefc36399bb7c2e292386e9fa3ea251f85ccb (patch) | |
tree | cc8ab5c869078c484e7a899208c692542ef6710f /Lib/dis.py | |
parent | 3973d277020a740787c40083eb101b2d0ec0eda3 (diff) | |
parent | 585c93daea510634ef0c99969b88bc320cdb61a1 (diff) | |
download | cpython-8b9eefc36399bb7c2e292386e9fa3ea251f85ccb.tar.gz cpython-8b9eefc36399bb7c2e292386e9fa3ea251f85ccb.zip |
Issue #26733: Disassembling a class now disassembles class and static methods.
Patch by Xiang Zhang.
Diffstat (limited to 'Lib/dis.py')
-rw-r--r-- | Lib/dis.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/dis.py b/Lib/dis.py index 2e80e178f05..532a367bce5 100644 --- a/Lib/dis.py +++ b/Lib/dis.py @@ -13,7 +13,8 @@ __all__ = ["code_info", "dis", "disassemble", "distb", "disco", "get_instructions", "Instruction", "Bytecode"] + _opcodes_all del _opcodes_all -_have_code = (types.MethodType, types.FunctionType, types.CodeType, type) +_have_code = (types.MethodType, types.FunctionType, types.CodeType, + classmethod, staticmethod, type) def _try_compile(source, name): """Attempts to compile the given source, first as an expression and |