summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-23 06:24:29 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-23 06:24:29 (GMT)
commit8b9eefc36399bb7c2e292386e9fa3ea251f85ccb (patch)
treecc8ab5c869078c484e7a899208c692542ef6710f /Lib/dis.py
parent3973d277020a740787c40083eb101b2d0ec0eda3 (diff)
parent585c93daea510634ef0c99969b88bc320cdb61a1 (diff)
downloadcpython-8b9eefc36399bb7c2e292386e9fa3ea251f85ccb.zip
cpython-8b9eefc36399bb7c2e292386e9fa3ea251f85ccb.tar.gz
cpython-8b9eefc36399bb7c2e292386e9fa3ea251f85ccb.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 2e80e17..532a367 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