Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 484: Clarify that submodules in a package are exported #309

Merged
merged 2 commits into from
Jul 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pep-0484.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,10 @@ Additional notes on stub files:
* 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 vary by Python version.)
given module that may vary by Python version.) Similarly, imports
of submodules in the ``__init__.pyi`` files of a package are
considered exported. For example, if ``a/__init__.pyi`` contains
just ``from . import b``, then ``b`` is exported.

* Stub files may be incomplete. To make type checkers aware of this, the file
can contain the following code::
Expand Down