Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 267d417

Browse files
committed
Fixed isinstance() check in dis.dis().
1 parent 00709aa commit 267d417

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/dis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def dis(x=None):
3535
print()
3636
elif hasattr(x, 'co_code'):
3737
disassemble(x)
38-
elif isinstance(x, str):
38+
elif isinstance(x, (bytes, bytearray)):
3939
disassemble_string(x)
4040
else:
4141
raise TypeError("don't know how to disassemble %s objects" %

0 commit comments

Comments
 (0)