Created
September 24, 2009 15:01
-
-
Save snim2/192782 to your computer and use it in GitHub Desktop.
Using the Python disassembler to analyse uncaught exceptions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import dis | |
>>> 1 / 0 | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
ZeroDivisionError: integer division or modulo by zero | |
>>> dis.dis() | |
1 0 LOAD_CONST 0 (1) | |
3 LOAD_CONST 1 (0) | |
--> 6 BINARY_DIVIDE | |
7 PRINT_EXPR | |
8 LOAD_CONST 2 (None) | |
11 RETURN_VALUE | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment