[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

A.M. Kuchling report at bugs.python.org
Tue Sep 10 11:28:42 CEST 2013


A.M. Kuchling added the comment:

I'm happy to change the function name, though I'll note that the traceback module does have print_tb(), format_tb() and extract_tb(). 

I'm OK with both of Victor's suggestions but personally slightly prefer traceback.clear_frames(tb).

Rationale: People who are keeping tracebacks around and want to save memory are probably using other functions from the traceback module, and the module has fairly short names (print_tb, format_exception) so I doubt they'll often do 'from traceback import clear_traceback_frames'.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1565525>
_______________________________________


More information about the Python-bugs-list mailing list