[issue16491] try-except-raise-bug
Mark Dickinson
report at bugs.python.org
Sat Nov 17 10:34:03 CET 2012
Mark Dickinson added the comment:
Here's the contents of the .rtf file:
PythonWin 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
try:
... 1/0
... except ZeroDivisionError as exp:
... raise TypeError('Divided by 0')
...
Traceback (most recent call last):
File "<interactive input>", line 4, in <module>
TypeError: Divided by 0
try:
... 1/0
... except ZeroDivisionError as exp:
... raise TypeError('Divided by 0') from exp
...
Traceback (most recent call last):
File "<interactive input>", line 4, in <module>
TypeError: Divided by 0
try:
... 1/0
... except ZeroDivisionError:
... raise TypeError('Divided by 0') from None
...
Traceback (most recent call last):
File "<interactive input>", line 4, in <module>
TypeError: Divided by 0
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16491>
_______________________________________
More information about the Python-bugs-list
mailing list