[Python-Dev] Why doesn't module finalization delete names as expected?
Antoine Pitrou
solipsis at pitrou.net
Wed Feb 1 11:38:49 EST 2017
More information about the Python-Dev mailing list
Wed Feb 1 11:38:49 EST 2017
- Previous message (by thread): [Python-Dev] Why doesn't module finalization delete names as expected?
- Next message (by thread): [Python-Dev] Core Python Projects for GSoC 2017?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 1 Feb 2017 03:23:02 -0500 Philippe Proulx <eeppeliteloop at 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.
- Previous message (by thread): [Python-Dev] Why doesn't module finalization delete names as expected?
- Next message (by thread): [Python-Dev] Core Python Projects for GSoC 2017?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list