Discourage relative imports.
This commit is contained in:
parent
a8bc8f6250
commit
8adb36ab81
|
@ -156,8 +156,9 @@ Imports
|
||||||
|
|
||||||
- Relative imports for intra-package imports are highly discouraged.
|
- Relative imports for intra-package imports are highly discouraged.
|
||||||
Always use the absolute package path for all imports.
|
Always use the absolute package path for all imports.
|
||||||
(However, once PEP 328 [7] is fully implemented, its style of
|
Even now that PEP 328 [7] is fully implemented in Python 2.5,
|
||||||
explicit relative imports will be recommended.)
|
its style of explicit relative imports is actively discouraged;
|
||||||
|
absolute imports are more portable and usually more readable.
|
||||||
|
|
||||||
- When importing a class from a class-containing module, it's usually okay
|
- When importing a class from a class-containing module, it's usually okay
|
||||||
to spell this
|
to spell this
|
||||||
|
|
Loading…
Reference in New Issue