Antoine Pitrou <pit...@free.fr> added the comment:

> Surely, if these objects define non-trivial 'close' members, they must 
> not be called during garbage collection.

Define "non-trivial". There are various tests for it in test_io.

Not ending up in gc.garbage is *by design*. Making file objects uncollectable 
as soon as they appear in a reference cycle would be a serious regression. 
That's why the cleanup is done in tp_dealloc instead of having a __del__.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9141>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to