On Mon, Nov 24, 2014 at 6:27 PM, Patrick Stinson <patrickk...@gmail.com> wrote:
> How does the __del__ method have a reference to the module’s globals dict?
> because it references the print function?
>
> Crazy. Is there any other way to comfort when a module is being deleted
> beside defining a class object with a printing dtor?

Functions have references to their modules. That's how they know what
globals to use.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to