A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-May/035778.html below:

[Python-Dev] a strange case

[Python-Dev] a strange case [Python-Dev] a strange caseWalter Dörwald walter@livinglogic.de
Tue, 20 May 2003 13:51:16 +0200
Guido van Rossum wrote:
>>But reload() won't work for these pseudo modules (See
>>http://www.python.org/sf/701743).
> 
> Reload() is a hack that doesn't really work except in the most simple
> cases.  This isn't one of those.

It could be made to work, if the code in a module had a way of
knowing whether this import is the first one or not, and it had
access to what was in sys.modules before the import mechanism
replaces it with an empty module.

>>What about the imp module?
 >
> Yes, what about it?  (I don't understand the remark.)

Does the imp module work with modules that replace the
module entry in sys.modules? (Code in PyImport_ExecCodeModuleEx()
seems to indicate that it does.)

Bye,
    Walter Dörwald





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4