[issue15209] Re-raising exceptions from an expression
Tyler Crompton
report at bugs.python.org
Wed Jul 25 23:46:22 CEST 2012
Tyler Crompton <gtr053 at gmail.com> added the comment:
As for the losing valuable debug information, much worse can be done:
import sys
try:
x
except NameError:
print('An error occurred.', file=sys.stderr)
sys.exit(1)
This is obviously not how one should handle errors in development, but it's allowed. As Ethan pointed out, the initial proposal can be recreated by just adding three words which is obviously also allowed.
Nick, I'm not saying you're opinions are wrong, I just wanted to point out how easy it is to throw away valuable information. It's almost futile.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15209>
_______________________________________
More information about the Python-bugs-list
mailing list