Nick Coghlan added the comment:

We seem to be talking past each other, so let's take a step back and ensure we 
have a common understanding of the absolute/relative terminology:

"import x.y.z" is an absolute import
"from x.y import z" is still an absolute import.
"from . import z" is an explicit relative import of a child or sibling module
"from .y import z" is also an explicit relative import

The relevant change in behaviour is between the "import x.y.z" form and the 
"from x.y import z" form due to the change in the way the related name binding 
(and name lookup in 3.5+) works, not between absolute and relative imports.

The relevant terminology to distinguish between "from ... import ..." vs 
"import ..." is just "from import" vs "non-from import", and there are 
definitely cases where from imports will work, but non-from imports will fail. 
That's not a style issue, it's a use-whichever-one-works for your code issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25294>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to