> Relying on the `__del__()` method isn't a good idea because there are no > really hard guaranties by the language if and when it will be called.
Ok, I read the __del__() docs and I understand using it is not a good idea. I can easily add a close_files() method that forces all dangling files to be closed. It would be useful in a number of other possible situations. However, as rightly pointed out by the exhaustive answer of Paul Moore, tracking references of my objects would be very useful. How can I do that? -- http://mail.python.org/mailman/listinfo/python-list