that way, you can do something like:
current_exception = sys.exception()
if current_exception is not None:
tb = traceback_with_variables.format_exc(current_exception)
instead of currently needing to do
current_exception = sys.exception()
if current_exception is not None:
tb = traceback_with_variables.format_exc(cast(current_exception, Exception))
and have the type checker be happy.
this makes sense more generally because there's no reason eg a KeyboardInterrupt shouldn't be handled with this library, right?