[Python-Dev] Reference cycles in Exception.__traceback__

Nick Coghlan ncoghlan at gmail.com
Fri Mar 7 06:25:01 CET 2014


On 6 Mar 2014 23:44, "Antoine Pitrou" <solipsis at pitrou.net> wrote:
>
> Le 05/03/2014 23:53, Nick Coghlan a écrit :
>>
>>
>> __traceback__ wouldn't change [...]
>
>
> Uh, really? If you want to suppress all reference cycles, you *have* to
remove __traceback__.
>
> The problem is to make computation of the traceback summary lightweight
enough that it doesn't degrade performance in the common case where you
don't have to print the traceback later.

The proposed summary extraction only keeps the exception type and its str
output, not the exception itself (as you don't need that to create the
formatted traceback).

Cheers,
Nick.

>
> Regards
>
> Antoine.
>
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140307/12dcc6ee/attachment.html>


More information about the Python-Dev mailing list