mirror of https://github.com/python/cpython
Tweak verbiage and markup for relative/absolute import. Backport candidate.
(I guess *all* changes to this file should be backported to the 3.0 branch.)
This commit is contained in:
parent
3432829ea0
commit
f519523f47
|
@ -457,10 +457,9 @@ Removed Syntax
|
||||||
* The :keyword:`from` *module* :keyword:`import` ``*`` syntax is only
|
* The :keyword:`from` *module* :keyword:`import` ``*`` syntax is only
|
||||||
allowed at the module level, no longer inside functions.
|
allowed at the module level, no longer inside functions.
|
||||||
|
|
||||||
* The only acceptable syntaxes for relative imports are :keyword:`from`
|
* The only acceptable syntax for relative imports is :keyword:`from`
|
||||||
``.`` :keyword:`import` *name* or
|
``.`` [*module*] :keyword:`import` *name*.
|
||||||
:keyword:`from` ``.module`` :keyword:`import` *name*.
|
All :keyword:`import` forms not starting with ``.`` are
|
||||||
:keyword:`import` forms not starting with ``.`` are always
|
|
||||||
interpreted as absolute imports. (:pep:`0328`)
|
interpreted as absolute imports. (:pep:`0328`)
|
||||||
|
|
||||||
* Classic classes are gone.
|
* Classic classes are gone.
|
||||||
|
|
Loading…
Reference in New Issue