[Python-Dev] question/comment about documentation of relative imports

Éric Araujo merwok at netwok.org
Tue Oct 5 20:03:52 CEST 2010

> If they were actively discouraged, perhaps performing a relative
> import would raise a warning,
This would be done if this import style was deprecated.  It’s different
from it being discouraged.

> or maybe distutils would raise a warning at install time,
Distutils does not inspect source files.

> Up until now, I was not aware that use of PEP 328 relative imports
> might be discouraged. I'm still unclear as to why they might be
> discouraged.
I think relative imports are a nice thing.  I think they’ve been added
because there are people who want them, and the previous implicit
relative imports caused so much pain.  Neither the FAQ you quote nor PEP
8 really explain what’s bad about explicit relative imports.


More information about the Python-Dev mailing list