Guido van Rossum f5f5fdbdd0 Significant speedup -- when a submodule imports a global module, add a
dummy entry to sys.modules, marking the absence of a submodule by the
same name.

Thus, if module foo.bar executes the statement "import time",
sys.modules['foo.time'] will be set to None, once the absence of a
module foo.time is confirmed (by looking for it in foo's path).

The next time when foo.bar (or any other submodule of foo) executes
"import time", no I/O is necessary to determine that there is no
module foo.time.

(Justification: It may seem strange to pollute sys.modules.  However,
since we're doing the lookup anyway it's definitely the fastest
solution.  This is the same convention that 'ni' uses and I haven't
heard any complaints.)
1997-09-06 20:29:52 +00:00
..
1996-10-25 14:44:06 +00:00
1997-09-05 07:33:22 +00:00
1997-09-05 07:33:22 +00:00
1996-10-25 14:44:06 +00:00
1997-08-15 02:52:08 +00:00
1997-05-05 22:15:02 +00:00
1997-07-19 19:48:41 +00:00
1996-10-25 14:44:06 +00:00
1997-09-05 07:33:22 +00:00
1997-07-19 19:48:41 +00:00
1997-07-19 19:48:41 +00:00
1997-05-07 23:51:07 +00:00
1996-08-29 18:10:41 +00:00
1997-09-05 07:33:22 +00:00
1997-05-07 23:51:07 +00:00
1997-03-14 04:32:50 +00:00
1997-08-21 02:28:19 +00:00
1996-08-29 18:10:30 +00:00
1996-08-19 22:12:39 +00:00
1997-08-07 19:22:48 +00:00
1997-05-22 20:41:59 +00:00