[Python-checkins] peps: Special case in stub files for import *.
guido.van.rossum
python-checkins at python.org
Fri Oct 30 11:40:45 EDT 2015
https://hg.python.org/peps/rev/e3910edda3c8
changeset: 6123:e3910edda3c8
user: Guido van Rossum <guido at python.org>
date: Fri Oct 30 08:40:37 2015 -0700
summary:
Special case in stub files for import *.
files:
pep-0484.txt | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/pep-0484.txt b/pep-0484.txt
--- a/pep-0484.txt
+++ b/pep-0484.txt
@@ -1040,7 +1040,12 @@
* Modules and variables imported into the stub are not considered
exported from the stub unless the import uses the ``import ... as
- ...`` form.
+ ...`` form or the equivalent ``from ... import ... as ...`` form.
+
+* However, as an exception to the previous bullet, all objects
+ imported into a stub using ``from ... import *`` are considered
+ exported. (This makes it easier to re-export all objects from a
+ given module that may very by Python version.)
Function overloading
--------------------
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list