On Sat, 10 Feb 2001, Guido van Rossum wrote: > > That's standard stuff; happens all the time. Hrmm... it makes me feel icky. > 1. The module gets compiled to bytecode, and the compiled bytecode > gets written to the .pyc file, before any attempt to execute is. > > 2. The spam module gets entered into sys.modules at the *start* of its > execution, for a number of reasons having to do with mutually > recursive modules. > > 3. The execution fails on the "import eggs" but that doesn't undo the > sys.modules assignment. > > 4. The second import of spam finds an incomplete module in > sys.modyles, but doesn't know that, so returns it. Is there a reason not to insert step 3.5? 3.5. If the import fails, remove the incomplete module from sys.modules. -- ?!ng
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