Discourage relative imports.

This commit is contained in:
Guido van Rossum 2006-03-15 22:47:10 +00:00
parent a8bc8f6250
commit 8adb36ab81
1 changed files with 3 additions and 2 deletions

View File

@ -156,8 +156,9 @@ Imports
- Relative imports for intra-package imports are highly discouraged.
Always use the absolute package path for all imports.
(However, once PEP 328 [7] is fully implemented, its style of
explicit relative imports will be recommended.)
Even now that PEP 328 [7] is fully implemented in Python 2.5,
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
to spell this