def format_exc(limit=None):
    try:
        etype, value, tb = sys.exc_info()
        return ''.join(format_exception(etype, value, tb, limit))
    finally:
        etype = value = tb = None
Jinja2 keeps internal caches for environments and lexers.  These are
dataset/ETHPy150Open babble/babble/include/jython/Lib/traceback.py/format_exc--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/jinja2-2.6/jinja2/utils.py/clear_caches