Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81446 > unrolled thread

Re: unloading a module created with imp.new_module

Started byChris Angelico <rosuav@gmail.com>
First post2014-11-24 19:36 +1100
Last post2014-11-24 19:36 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: unloading a module created with imp.new_module Chris Angelico <rosuav@gmail.com> - 2014-11-24 19:36 +1100

#81446 — Re: unloading a module created with imp.new_module

FromChris Angelico <rosuav@gmail.com>
Date2014-11-24 19:36 +1100
SubjectRe: unloading a module created with imp.new_module
Message-ID<mailman.16240.1416818193.18130.python-list@python.org>
On Mon, Nov 24, 2014 at 6:27 PM, Patrick Stinson <patrickkidd@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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web