Le 05/03/2014 17:37, Victor Stinner a écrit :

Python 3.4 introduced frame.clear(), but frame.clear() raises an
RuntimeError if the frame is still running. And it doesn't break all
reference cycles.

An obvious workaround is to store the traceback as text, but this
operation is "expensive" especially if the traceback is only needed in
rare cases.

Another "obvious" workaround is to call frame.clear() from the parent function (i.e. have a dedicated wrapping layer).

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to