New submission from Antoine Pitrou:

I think we may want to add a finalize() or close() method on frame objects 
which would clear all local variables (as well as dereference the globals dict, 
perhaps), after having optionally run a generator's close() method (if the 
frame belongs to a generator).

If I'm not mistaken, it should allow breaking reference cycles, and remove the 
need for complex traceback processing, which Twisted currently also does: 
http://twistedmatrix.com/trac/browser/trunk/twisted/python/failure.py#L89

Note that generator cleanup through the frame has a patch in issue17807.

(spinned off from issue17911)

----------
components: Interpreter Core
messages: 188718
nosy: ncoghlan, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Add a frame method to clear expensive details
type: enhancement
versions: Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17934>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to