>>> try:
... int("")
... except ValueError:
... raise RuntimeError
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
RuntimeError
>>> try:
... int("")
... except ValueError as e:
... raise RuntimeError from e
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
RuntimeError
>>> try:
... int("")
... except ValueError:
... raise RuntimeError from None
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
RuntimeError