Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f519523

Browse files
committed
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.)
1 parent 3432829 commit f519523

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Doc/whatsnew/3.0.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,9 @@ Removed Syntax
457457
* The :keyword:`from` *module* :keyword:`import` ``*`` syntax is only
458458
allowed at the module level, no longer inside functions.
459459

460-
* The only acceptable syntaxes for relative imports are :keyword:`from`
461-
``.`` :keyword:`import` *name* or
462-
:keyword:`from` ``.module`` :keyword:`import` *name*.
463-
:keyword:`import` forms not starting with ``.`` are always
460+
* The only acceptable syntax for relative imports is :keyword:`from`
461+
``.`` [*module*] :keyword:`import` *name*.
462+
All :keyword:`import` forms not starting with ``.`` are
464463
interpreted as absolute imports. (:pep:`0328`)
465464

466465
* Classic classes are gone.

0 commit comments

Comments
 (0)