◐ Shell
clean mode source ↗

Message 191217 - Python tracker

> Usually garbage collection will end up clearing the module's dict anyway.

This is not true, since global objects might have a __del__ and then hold the whole module dict alive through a reference cycle. Happily though, PEP 442 is going to make that concern obsolete.

As for the interpreter shutdown itself, I have a pending patch (post-PEP 442) to get rid of the globals cleanup as well. It may be better to merge the two approaches.