[docs] [issue25294] Absolute imports fail in some cases where relative imports would work
report at bugs.python.org
Sat Oct 3 14:54:38 CEST 2015
Nick Coghlan added the comment:
Issue 992389 is the previous incarnation of this bug report, while issue 17636 made the change so that from imports will resolve in some situations where this error will occur.
That fact that "from x.y.b import foo" may now resolve in cases where "import x.y.b; foo = x.y.b.foo" will fail should indeed be covered in the documentation.
If PEP 8 were to be updated at all, it should just say "Don't use circular imports. If you can't refactor your design to move the common components out to a shared helper module, then move everything into the same module - the irremovable circular dependency indicates the code is too tightly coupled to live in different modules".
Python tracker <report at bugs.python.org>
More information about the docs