[Python-Dev] distutils.sys: None in sys.modules

Guido van Rossum guido@digicool.com
Tue, 10 Apr 2001 09:23:21 -0500


> At this point sys.modules['foo.sys'] is a real module, as it should
> be, but sys.modules['foo.os'] is None.  I don't see why 'foo.os'
> should be present at all.

See Gordon's reply (I think Marc-Andre was off base on this one):
sys.modules['foo.sys'] is set to None to prevent every "import sys" in
submodules of the foo package to hit the disk looking for foo/sys.py.

--Guido van Rossum (home page: http://www.python.org/~guido/)