Message201482
Benjamin: I think that in most cases the intention of a ".. from None" is to disable printing of a stack trace for a specific exception when it occurs in the try .. except block. (In the example, that would be suppressing the stacktrace for the "Second" exception, because it is explicity converted to "Third"). I do not think that this ought to effect the printing of exceptions that occured previously and higher-up in the call chain.
In other words, I think it is natural to expect that
def foo():
try:
do_stuff
except Something:
raise SomethingElse from None
disables printing the stack trace for `Something` exceptions when they occur in the try..except block -- but not to hide the exception context for exceptions that occured before foo() was even called. |
|
Date |
User |
Action |
Args |
2013-10-27 18:22:46 | nikratio | set | recipients:
+ nikratio, ncoghlan, benjamin.peterson |
2013-10-27 18:22:46 | nikratio | set | messageid: <1382898166.77.0.906090640723.issue18861@psf.upfronthosting.co.za> |
2013-10-27 18:22:46 | nikratio | link | issue18861 messages |
2013-10-27 18:22:46 | nikratio | create | |
|