[Python-checkins] r52317 - sandbox/trunk/import_in_py/importer.py
brett.cannon
python-checkins at python.org
Thu Oct 12 19:44:05 CEST 2006
Author: brett.cannon
Date: Thu Oct 12 19:44:04 2006
New Revision: 52317
Modified:
sandbox/trunk/import_in_py/importer.py
Log:
Add comment made by Jim Jewett about drawback of having __import__ manage
sys.modules.
Modified: sandbox/trunk/import_in_py/importer.py
==============================================================================
--- sandbox/trunk/import_in_py/importer.py (original)
+++ sandbox/trunk/import_in_py/importer.py Thu Oct 12 19:44:04 2006
@@ -44,6 +44,10 @@
+ If __import__ handles sys.modules then the impact from having to
recheck sys.path entries that lack an importer is minimized as it is
only on imports that have not been handled before.
+ - This has the drawback of making it more difficult for
+ non-standard modules to be put into sys.modules. Could go other
+ way and hyper-generalize by having a meta_path importer that
+ returns entries in sys.path.
PTL use-case:
* Tweaked source files that need to be pre-processed before they are imported.
More information about the Python-checkins
mailing list