On Wed, 1 Feb 2017 03:23:02 -0500 Philippe Proulx <eeppelitel...@gmail.com> wrote: > > It feels like `bread` is never deleted in the module initialization > situation, but I don't know why: the only reference to the Bread Python > object is this `bread` name in the module... what could prevent this > object's __del__() method to be called? It works when I call `del bread` > manually: I would expect that the module finalization does the exact > same thing?
When do you expect module finalization to happen? Your module is recorded in sys.modules so, unless you explicitly remove it from there, module finalization will only happen at interpreter shutdown. (and this question is more appropriate for the python-list, anyway) Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com