@@ -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
5252Motivation
@@ -162,7 +162,7 @@ users found useful functionality in a module's private API, and nothing was
162162discouraging them from using it.
163163
164164In 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
166166compatibility policy, but contain a leading underscore. For example:
167167
1681681. :class: `ctypes._CFuncPtr `
@@ -322,7 +322,7 @@ downstream breakage. In this case, the library maintainer has to make a decision
322322 to take place.
3233232. 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
327327This PEP is not intended to solve this problem entirely, but instead is meant
328328to 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
385385attributes.
386386
387387Though 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
389389a name that is not in ``__export__ ``; see :ref: `pep-842-attribute-access `.
390390
391391
@@ -903,6 +903,15 @@ is semantically equivalent to:
903903Similar to the other ``export `` constructs, this must occur at the module-level;
904904using 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
907916Rationale
908917=========
@@ -1038,7 +1047,7 @@ annotating their own code.
10381047
10391048In addition, it's not clear that there's any good spelling for this
10401049behavior 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
10421051that isn't backwards compatible; codebases wanting to opt-in to the behavior
10431052described by this PEP must use a spelling that works on all supported Python
10441053versions in order to keep their code working on older versions, so any
0 commit comments