sys.exc_info or sys.last_*?
Question: Should I prefer
[`sys.exc_info()`](http://docs.python.org/py3k/library/sys.html#sys.exc_info)
over
[`sys.last_value`](http://docs.python.org/py3k/library/sys.html#sys.last_type)
and friends (`sys.last_type`, `sys.last_traceback`)?


Answer: Looking at the documentation of `sys.last_value` and friends:

> Their intended use is to allow an interactive user to import a debugger
> module and engage in post-mortem debugging without having to re-execute the
> command that caused the error.

So, if you are in an interpreter doing debugging I suggest using
`sys.last_value`, but in a script I suggest you to use `sys.exc_info()`.

