PEP 484: Clarify that 'import ... as ...' means 'X as X' (#1630)
This commit is contained in:
parent
f86dbb0f41
commit
0f7f6400a1
|
@ -1651,6 +1651,9 @@ Additional notes on stub files:
|
||||||
* Modules and variables imported into the stub are not considered
|
* Modules and variables imported into the stub are not considered
|
||||||
exported from the stub unless the import uses the ``import ... as
|
exported from the stub unless the import uses the ``import ... as
|
||||||
...`` form or the equivalent ``from ... import ... as ...`` form.
|
...`` form or the equivalent ``from ... import ... as ...`` form.
|
||||||
|
(*UPDATE:* To clarify, the intention here is that only names
|
||||||
|
imported using the form ``X as X`` will be exported, i.e. the name
|
||||||
|
before and after ``as`` must be the same.)
|
||||||
|
|
||||||
* However, as an exception to the previous bullet, all objects
|
* However, as an exception to the previous bullet, all objects
|
||||||
imported into a stub using ``from ... import *`` are considered
|
imported into a stub using ``from ... import *`` are considered
|
||||||
|
|
Loading…
Reference in New Issue