Skip to content

Commit 6bbcff7

Browse files
committed
Clarify some language and terminology.
1 parent 7bf4ce5 commit 6bbcff7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/spec/distributing.rst

+9-8
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,25 @@ Python packages and modules. Stub files serve multiple purposes:
1616
* They are the only way to add type information to extension modules.
1717
* They can provide type information for packages that do not wish to
1818
add them inline.
19-
* They can be distributed separately from the implementation.
19+
* They can be distributed separately from the package or module that they
20+
provide types for. The latter is referred to as the *implementation*.
2021
This allows stubs to be developed at a different pace or by different
2122
authors, which is especially useful when adding type annotations to
2223
existing packages.
2324
* They can act as documentation, succinctly explaining the external
24-
API of a package, without including the implementation or private
25+
API of a package, without including implementation details or private
2526
members.
2627

2728
Stub files use a subset of the constructs used in Python source files, as
2829
described in :ref:`stub-file-supported-constructs` below. Type checkers should
2930
parse a stub that uses only such constructs without error and not interpret any
30-
construct in a contradictory manner. However, type checkers are not required to
31-
implement checks for all of these constructs and can elect to ignore unsupported
32-
ones. Additionally, type checkers can support constructs not described here.
31+
construct in a manner contradictory to this specification. However, type
32+
checkers are not required to implement checks for all of these constructs and
33+
can elect to ignore unsupported ones. Additionally, type checkers can support
34+
constructs not described here.
3335

34-
If a stub
35-
file is found for a module, the type checker should not read the corresponding "real" module.
36-
See :ref:`mro` for more information.
36+
If a stub file is found for a module, the type checker should not read the
37+
corresponding "real" module. See :ref:`mro` for more information.
3738

3839
.. _stub-file-syntax:
3940

0 commit comments

Comments
 (0)