Berker Peksag added the comment:
Hi Claudiu, thanks for the report, but I don't think this is a common use case
that needs to be supported in the standard library. Other people may prefer to
use different solutions in a similar case (e.g. using a debugger) Plus, it's
not hard to implement this
New submission from Claudiu Saftoiu:
When debugging code that raises unexpected exceptions, I often find myself
doing this:
try:
some_code
except:
import code; code.interact(local=locals())
raise
My suggestion is a context manager to make this less verbose: