summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-23 06:23:52 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-23 06:23:52 (GMT)
commit585c93daea510634ef0c99969b88bc320cdb61a1 (patch)
tree96cf0ddb48e16e689db2a25ea2fa2edcf06519bc /Lib/dis.py
parent21ce717eafca96b60fb1c6a791332a41e6777783 (diff)
downloadcpython-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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index af37cdf..841208f 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