Commit 267d4173 authored by Alexandre Vassalotti's avatar Alexandre Vassalotti

Fixed isinstance() check in dis.dis().

parent 00709aaa
...@@ -35,7 +35,7 @@ def dis(x=None): ...@@ -35,7 +35,7 @@ def dis(x=None):
print() print()
elif hasattr(x, 'co_code'): elif hasattr(x, 'co_code'):
disassemble(x) disassemble(x)
elif isinstance(x, str): elif isinstance(x, (bytes, bytearray)):
disassemble_string(x) disassemble_string(x)
else: else:
raise TypeError("don't know how to disassemble %s objects" % raise TypeError("don't know how to disassemble %s objects" %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment