[Python-Dev] Relative vs. absolute imports

Aahz aahz at pythoncraft.com
Tue May 18 13:36:41 EDT 2004


On Tue, May 18, 2004, M.-A. Lemburg wrote:
>
> BTW, what are you going to do about "from . import *" and
> "from .. import *" ?

Those work exactly the same way they currently do: find the appropriate
namespace and import all available names.  It will raise some kind of
``ImportError`` if it goes outside the package, though (note added to
PEP).  I'll be adding some verbage about ``__import__()``; thanks for
raising the issue.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Adopt A Process -- stop killing all your children!



More information about the Python-Dev mailing list