diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-23 06:23:52 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-23 06:23:52 (GMT) |
commit | 585c93daea510634ef0c99969b88bc320cdb61a1 (patch) | |
tree | 96cf0ddb48e16e689db2a25ea2fa2edcf06519bc /Lib/dis.py | |
parent | 21ce717eafca96b60fb1c6a791332a41e6777783 (diff) | |
download | cpython-585c93daea510634ef0c99969b88bc320cdb61a1.zip cpython-585c93daea510634ef0c99969b88bc320cdb61a1.tar.gz cpython-585c93daea510634ef0c99969b88bc320cdb61a1.tar.bz2 |
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
@@ -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 |