Skip to content

Instantly share code, notes, and snippets.

@justinfay
Created May 11, 2016 12:36
Show Gist options
  • Select an option

  • Save justinfay/3692002a47e6b275652bcc9baa6d895a to your computer and use it in GitHub Desktop.

Select an option

Save justinfay/3692002a47e6b275652bcc9baa6d895a to your computer and use it in GitHub Desktop.
# Python3
>>> try:
... raise ValueError()
... except ValueError:
... raise IndexError()
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
IndexError
>>>
# Python2>
>> try:
... raise ValueError()
... except ValueError:
... raise IndexError()
...
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
IndexError
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment