[Python-Dev] Reference cycles in Exception.traceback (original) (raw)

Yury Selivanov yselivanov.ml at gmail.com
Thu Mar 6 16:03:09 CET 2014


On 2014-03-06, 8:42 AM, Antoine Pitrou 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.

So why can't we allow instantiation of types.TracebackType & types.FrameType?

It should be about the same time to reconstruct traceback and its frames without locals, as to create named tuples.

Yury



More information about the Python-Dev mailing list