[Python-Dev] What is the precise problem? [was: Reference cycles in Exception.traceback] (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Tue Mar 11 00:16:46 CET 2014


On Mon, 10 Mar 2014 16:08:52 -0700 (PDT) "Jim J. Jewett" <jimjjewett at gmail.com> wrote:

It may also be more common to have multiple del methods in the same cycle, if cycles are created by a framework. So the problems aren't new, but they may have become considerably more painful.

Multiple __del__s shouldn't change anything compared to a single del or even none (see PEP 442).

Maciej:>> I'm very skeptical about changing details of traceback and Maciej:>> frames, just in order to make refcounting work (since it would Maciej:>> create something that would not work on pypy for example).

How about just loosening some constraints on exceptions, in order to permit more efficient operation, but in a way that may be particularly useful to a refcounting scheme? Can I assume that you don't object to frame.clear()?

I posted a prototype change (in this thread) which automatically calls frame.clear(), I didn't get any feedback about it.

Regards

Antoine.



More information about the Python-Dev mailing list