a bit more rationale for absolute imports
This commit is contained in:
parent
d5722e13e2
commit
5d8316d6de
|
@ -83,7 +83,10 @@ package, it is not clear whether ::
|
|||
import foo
|
||||
|
||||
refers to a top-level module or to another module inside the package.
|
||||
To resolve the ambiguity, it is proposed that ``foo`` will always be a
|
||||
Let's say today it refers to a module internal to the package. Then
|
||||
tomorrow, the standard library decides to add its own foo package that
|
||||
you'd like to use. You can't without renaming your internal module.
|
||||
To resolve these ambiguities, it is proposed that ``foo`` will always be a
|
||||
module or package reachable from ``sys.path``.
|
||||
|
||||
Because this represents a change in semantics, absolute imports will
|
||||
|
|
Loading…
Reference in New Issue