[Python-Dev] Alternative Approach to Relative Imports

Greg Ward gward@cnri.reston.va.us
Wed, 22 Sep 1999 13:26:12 -0400

On 22 September 1999, Guido van Rossum said:
> 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!

Especially since doing so doesn't work: for example, the
distutils.errors module started life as distutils.exceptions.  That
changed pretty quickly, once I realized why putting

   import exceptions

into other distutils modules didn't work -- obviously it didn't find my
distutils.exceptions.  Arguably I should have used an absolute import,
but what the heck.

Greg Ward - software developer                    gward@cnri.reston.va.us
Corporation for National Research Initiatives    
1895 Preston White Drive                           voice: +1-703-620-8990
Reston, Virginia, USA  20191-5434                    fax: +1-703-620-0913