[Python-checkins] r52292 - sandbox/trunk/import_in_py/importer.py
Jim Jewett
jimjjewett at gmail.com
Thu Oct 12 15:41:17 CEST 2006
On 10/11/06, brett.cannon <python-checkins at python.org> wrote:
> New Revision: 52292
==============================================================================
> --- sandbox/trunk/import_in_py/importer.py (original)
> +++ sandbox/trunk/import_in_py/importer.py Thu Oct 12 01:56:56 2006
> @@ -34,14 +34,18 @@
> Possible Py3K improvements:
> * Have __import__ check for sys.modules entry to alleviate need for every
> loader to do so.
> - * Have __import__ pass in module to initialize for imported module so to
> - alleviate loader from having to pull from sys.modules.
> + * Have __import__ pass into the loader the module to be initialized so as
> + remove that boilerplate (also keeps sys.modules manipulation within
> + __import__ when the previous suggestion is used).
Putting a "just get the one that's already there" loader at the front
should take care of this.
Having __import__ always generate the module would make it harder to
use things that aren't really modules. (examples: A module with a
custom __dict__ type that gripes at external modification; the
forwarders used when a module changes its name; Lazy Importers)
-jJ
More information about the Python-checkins
mailing list