Armin Rigo added the comment:
If I understood correctly, Python 3.4 tries harder to find cycles and call
destructors at the end of the program, but that's not a full guarantee. For
example you can have a reference from a random C extension module.
While trying to come up with an example, I found one that I don't fully
understand, but the point is that it shows how easy it is to defeats it:
import sys
f = open('foo.txt', 'w')
f.write('abc')
def func(*args):
return func
sys.settrace(func)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17852>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com