]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Of course, when the type of the argument to dis() is unsupported, it
authorGuido van Rossum <guido@python.org>
Fri, 17 Jan 1997 20:08:18 +0000 (20:08 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 17 Jan 1997 20:08:18 +0000 (20:08 +0000)
should raise TypeError, not ValueError...

Lib/dis.py

index 50e6c1dbb8d2b6aee49a6ee09cfb06960e07bfd7..3957f9cf8bc801f8165d457c133c0fe23636fcb2 100644 (file)
@@ -14,7 +14,7 @@ def dis(x=None):
                if hasattr(x, 'co_code'):
                        disassemble(x)
                else:
-                       raise ValueError, \
+                       raise TypeError, \
                              "don't know how to disassemble %s objects" % \
                              type(x).__name__