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

Skip to content

Commit 00f86e6

Browse files
committed
Of course, when the type of the argument to dis() is unsupported, it
should raise TypeError, not ValueError...
1 parent bd30795 commit 00f86e6

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
@@ -14,7 +14,7 @@ def dis(x=None):
1414
if hasattr(x, 'co_code'):
1515
disassemble(x)
1616
else:
17-
raise ValueError, \
17+
raise TypeError, \
1818
"don't know how to disassemble %s objects" % \
1919
type(x).__name__
2020

0 commit comments

Comments
 (0)