From 76e6968355785e51feda36f27bbcd5fb100ebf0b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 30 Sep 2020 11:33:21 -0700 Subject: [PATCH 1/2] PEP 484: Clarify that 'import ... as ...' means 'X as X' --- pep-0484.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pep-0484.txt b/pep-0484.txt index ac0c7f65bfc..ebb831c2a19 100644 --- a/pep-0484.txt +++ b/pep-0484.txt @@ -1651,6 +1651,9 @@ Additional notes on stub files: * Modules and variables imported into the stub are not considered exported from the stub unless the import uses the ``import ... as ...`` form or the equivalent ``from ... import ... as ...`` form. + (*UPDATE:* To clarify, the intention here is that only names 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 imported into a stub using ``from ... import *`` are considered From e80a8153e8767bc3261ae970722c2f7682fdf515 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 30 Sep 2020 13:25:02 -0700 Subject: [PATCH 2/2] Suggestion from @hauntsaninja --- pep-0484.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pep-0484.txt b/pep-0484.txt index ebb831c2a19..1980e661223 100644 --- a/pep-0484.txt +++ b/pep-0484.txt @@ -1651,9 +1651,9 @@ Additional notes on stub files: * Modules and variables imported into the stub are not considered exported from the stub unless the import uses the ``import ... as ...`` form or the equivalent ``from ... import ... as ...`` form. - (*UPDATE:* To clarify, the intention here is that only names using - the form ``X as X`` will be exported, i.e. the name before and after - ``as`` must be the same.) + (*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 imported into a stub using ``from ... import *`` are considered