[Python-Dev] python package

Guido van Rossum guido@python.org
Wed, 10 Jul 2002 18:51:59 -0400


> How about adding
> 
> python.py:
> __path__ = ['.']
> 
> This would not only reserve the name in the global namespace,
> but also enable applications to start using 'from python import x'
> now without much fuzz.

Then I have to ask the question I originally wanted to ask: what
problem would that solve?  And is this the right solution?

Also, it would make *all* standard modules accessible through the
python package -- surely this isn't what we want (not if we use the
Java example at least).

Also, for some modules (that keep some global state) it's a bad idea
if they are imported twice, since their initialization code would be
run twice, and there would be two separate instances of the module.

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