[Python-checkins] r74585 - in python/branches/py3k: Doc/reference/simple_stmts.rst Misc/NEWS
brett.cannon
python-checkins at python.org
Sun Aug 30 06:00:13 CEST 2009
Author: brett.cannon
Date: Sun Aug 30 06:00:12 2009
New Revision: 74585
Log:
Document the import semantics that if None is found in sys.modules for a module then ImportError is raised.
Modified:
python/branches/py3k/Doc/reference/simple_stmts.rst
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Doc/reference/simple_stmts.rst
==============================================================================
--- python/branches/py3k/Doc/reference/simple_stmts.rst (original)
+++ python/branches/py3k/Doc/reference/simple_stmts.rst Sun Aug 30 06:00:12 2009
@@ -668,7 +668,9 @@
"module" will refer to both packages and modules), searching
for the module or package can begin. The first place checked is
:data:`sys.modules`, the cache of all modules that have been imported
-previously. If the module is found there then it is used in step (2) of import.
+previously. If the module is found there then it is used in step (2) of import
+unless :keyword:`None` is found in :data:`sys.modules`, in which case
+:exc:`ImportError` is raised.
.. index::
single: sys.meta_path
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sun Aug 30 06:00:12 2009
@@ -174,6 +174,9 @@
Documenation
------------
+- Document that importing a module that has None in sys.modules triggers an
+ ImportError.
+
- Issue #6556: Fixed the Distutils configuration files location explanation
for Windows.
More information about the Python-checkins
mailing list