A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-March/132952.html below:

[Python-Dev] Reference cycles in Exception.__traceback__

[Python-Dev] Reference cycles in Exception.__traceback__ [Python-Dev] Reference cycles in Exception.__traceback__Victor Stinner victor.stinner at gmail.com
Thu Mar 6 16:19:14 CET 2014
2014-03-06 14:42 GMT+01:00 Antoine Pitrou <solipsis at pitrou.net>:
> 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.

By the way, here is my test script to try to create a lightweight
traceback object without references to locals:
https://bitbucket.org/haypo/misc/src/tip/python/suppress_locals.py

It works if there is no chained exception.

The problem is to build something working with the traceback module. I
should maybe write my own formatting function reusing some traceback
functions.

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4