On Fri, Jan 30, 2015 at 8:30 AM, Marko Rauhamaa <[email protected]> wrote: > Ian Kelly <[email protected]>: > >> The bare raise re-raises the most recent exception that is being >> handled. The "raise e" raises that exception specifically, which is >> not the most recent in the case of a secondary exception. > > Scary. That affects all finally clauses. Must remember that. > > The pitfall is avoided by using the "except: pass" antipattern but then > you lose exception chaining.
Like I suggested earlier, just don't catch the inner exception at all. The result will be both exceptions propagated, chained in the proper order. -- https://mail.python.org/mailman/listinfo/python-list
