STINNER Victor <vstin...@redhat.com> added the comment:
> I thought that local-variables were deterministically (ref-countering) > destructed. What is happening? IT's a reference cycle. Exception => traceback => frame => exception. The 'err' variable kept the frame alive which kept the exception alive which kept everything alive. The GC is supposed to be able to break ref cycles, but GC collections are irregular and sometimes the GC fails to break complex cycles. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com