File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1124,7 +1124,7 @@ the following writable attributes:
11241124
11251125.. attribute :: module.__lazy_modules__
11261126
1127- An optional :term: `iterable ` of absolute module name strings. When defined
1127+ An optional :term: `iterable ` of fully qualified module name strings. When defined
11281128 at module scope, any regular :keyword: `import ` statement in that module whose
11291129 target module name appears in this iterable is treated as a
11301130 :ref: `lazy import <lazy-imports >`, as if the :keyword: `lazy ` keyword had
Original file line number Diff line number Diff line change @@ -931,7 +931,7 @@ Compatibility mode via ``__lazy_modules__``
931931As an alternative to using the :keyword: `lazy ` keyword, a module can opt
932932into lazy loading for specific imports by defining a module-level
933933:attr: `~module.__lazy_modules__ ` variable. When present, it must be an
934- :term: `iterable ` of absolute module name strings. Any regular (non-``lazy ``)
934+ :term: `iterable ` of fully qualified module name strings. Any regular (non-``lazy ``)
935935:keyword: `import ` statement at module scope whose target appears in
936936:attr: `!__lazy_modules__ ` is treated as a lazy import, exactly as if the
937937:keyword: `lazy ` keyword had been used.
@@ -948,7 +948,7 @@ Python versions older than 3.15 while leveraging lazy imports on 3.15+::
948948 import pathlib # loaded lazily
949949
950950Relative imports are resolved to their absolute name before the lookup, so
951- the sequence must always contain absolute module names.
951+ the sequence must always contain fully qualified module names.
952952
953953Imports inside functions, class bodies, or
954954:keyword: `try `/:keyword: `except `/:keyword: `finally ` blocks are always eager,
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ raise :exc:`SyntaxError`).
185185For code that cannot use the ``lazy `` keyword directly (for example, when
186186supporting Python versions older than 3.15 while still leveraging lazy
187187imports on 3.15+), a module can define
188- :attr: `~module.__lazy_modules__ ` as an :term: `iterable ` of absolute module
188+ :attr: `~module.__lazy_modules__ ` as an :term: `iterable ` of fully qualified module
189189name strings. Regular ``import `` statements for those modules are then treated
190190as lazy, with the same semantics as the ``lazy `` keyword::
191191
You can’t perform that action at this time.
0 commit comments