[Python-Dev] Relative Package Imports

Gordon McMillan gmcm@hypernet.com
Tue, 14 Sep 1999 08:21:26 -0400

M.-A. Lemburg wrote:

<color><param>0000,7F00,0000</param>> Agreed. I would much prefer imputil.py to become a standard -- then I

> could add my hook into its chain and wouldn't have to argue for using

> relative imports ;-) 

</color>Hear hear!

<color><param>0000,7F00,0000</param>> But then, how would I tell if someone else</color>

<color><param>0000,7F00,0000</param>> already has integrated such a hook in the chain ? I sure wouldn't want

> to add another one just to make sure...

</color>Actually, imputil was designed to be used either generally or 
specifically. In other words, a package can install a link in the 
chain just for its contents. The hook can pass on the request as 
soon as it realizes that the request is not "his". The overhead 
involved is probably insignificantly different from having complex 
tests in a single generalized hook.

- Gordon