[Python-Dev] What is the precise problem? [was: Reference cycles in Exception.__traceback__]

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