[Python-Dev] Alternative Approach to Relative Imports

Guido van Rossum guido@CNRI.Reston.VA.US
Wed, 22 Sep 1999 11:51:49 -0400


> > Comment 2: I generally like this scheme, but think (for
> > consistency and confusion-reduction) that it should go straight
> > up the tree, instead of checking the root second.
> 
> That would probably break code because the search could
> find some other module having the same name as a top-level
> one. OTOH, perhaps that situation is not all the common to
> fear too much about it.
> 
> Walking up all the way would certainly be easier to explain to
> a 12-year old ;-)

Yes, please.  Do the long-term understandable thing here.  I expect
not too many packages have defined subpackages (or submodules) whose
name conflicts with a standard library module, so you ought to be
pretty safe here!

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