Skip to content

Commit d367911

Browse files
committed
More editorial fixes.
1 parent 685054d commit d367911

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

‎peps/pep-0842.rst‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ For example:
4646
4747
4848
This is **not** intended to be an access modifier for Python; see
49-
:ref:`pep-842-not-an-access-modifier`.
49+
:ref:`the rationale <pep-842-not-an-access-modifier>`.
5050

5151

5252
Motivation
@@ -162,7 +162,7 @@ users found useful functionality in a module's private API, and nothing was
162162
discouraging them from using it.
163163

164164
In the standard library, a prime example of this is the :mod:`ctypes` module.
165-
``ctypes`` is full of public APIs that are subject to Python's backwards
165+
``ctypes`` is full of stable APIs that are subject to Python's backwards
166166
compatibility policy, but contain a leading underscore. For example:
167167

168168
1. :class:`ctypes._CFuncPtr`
@@ -322,7 +322,7 @@ downstream breakage. In this case, the library maintainer has to make a decision
322322
to take place.
323323
2. Commit to maintaining the private API as public, increasing the burden on
324324
themselves and encountering some of the problems described in
325-
:ref:`pep-842-prefixed-public`.
325+
:ref:`the motivation <pep-842-prefixed-public>`.
326326

327327
This PEP is not intended to solve this problem entirely, but instead is meant
328328
to mitigate it by making it much clearer that a user is accessing a private name;
@@ -385,7 +385,7 @@ module. ``ExportWarning`` inherits from :class:`Warning` and defines no other
385385
attributes.
386386

387387
Though allowed, it is not intended to be emitted by user code; instead, it is
388-
meant for emission by a :class:`module object <types.ModuleType>` when accessing
388+
meant for emission by a :class:`module <types.ModuleType>` object when accessing
389389
a name that is not in ``__export__``; see :ref:`pep-842-attribute-access`.
390390

391391

@@ -903,6 +903,15 @@ is semantically equivalent to:
903903
Similar to the other ``export`` constructs, this must occur at the module-level;
904904
using it elsewhere is a :class:`SyntaxError`.
905905

906+
Lazy imports, as described by :pep:`810`, are also allowed to be used with ``from``
907+
exports. For example:
908+
909+
.. code-block:: python+soft-keywords:export
910+
911+
lazy from foo export bar
912+
913+
The existing rules for lazy imports apply here as well.
914+
906915

907916
Rationale
908917
=========
@@ -1038,7 +1047,7 @@ annotating their own code.
10381047

10391048
In addition, it's not clear that there's any good spelling for this
10401049
behavior that covers all cases. The "obvious" solution is to add a
1041-
new :ref:`future statement <future>` that makes ``__all__`` more strict, but
1050+
new :ref:`future statement <python:future>` that makes ``__all__`` more strict, but
10421051
that isn't backwards compatible; codebases wanting to opt-in to the behavior
10431052
described by this PEP must use a spelling that works on all supported Python
10441053
versions in order to keep their code working on older versions, so any

0 commit comments

Comments
 (0)