Relative Imports, why the hell is it so hard?

Aahz aahz at pythoncraft.com
Mon Mar 30 20:15:59 EDT 2009


In article <mailman.2591.1237922208.11746.python-list at python.org>,
Gabriel Genellina <gagsl-py2 at yahoo.com.ar> wrote:
>
>I'd recommend the oposite - use relative (intra-package) imports when  
>possible. Explicit is better than implicit - and starting with 2.7 -when  
>"absolute" import semantics will be enabled by default- you'll *have* to  
>use relative imports inside a package, or fail.

Really?  I thought you would still be able to use absolute imports; you
just won't be able to use implied relative imports instead of explicit
relative imports.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."  --Brian W. Kernighan



More information about the Python-list mailing list