On Sun, 27 Jun 2010 19:20:07 +0200 "M.-A. Lemburg" firstname.lastname@example.org wrote:
Not necessarily roll back the feature, but an implementation that deliberately introduces circular references is not really ideal.
Since tracebacks on exceptions are rarely used by applications, I think it would be better to turn them into weak references.
How do you manage to get a strong reference before the traceback object gets deleted? Besides, an API which gives some information in an unreliable manner does not seem very user-friendly to me.
I think I like the OP's idea better: allow to release the references to local and global variables from the frames in the traceback. This is keeps a lot of potentially large objects alive - some of which may also keep some OS resources busy.