Skip to content
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions peps/pep-0810.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ When an import is lazy, ``__lazy_import__`` is called instead of
``__import__``. It adds the module name to ``sys.lazy_modules``, a set of
fully-qualified module names which have been lazily imported at some point
(primarily for diagnostics and introspection), and returns a
:class:`!types.LazyImportType`` object for the module.
:class:`!types.LazyImportType` object for the module.

The implementation of ``from ... import`` (the ``IMPORT_FROM`` bytecode
implementation) checks if the module it's fetching from is a lazy module
Expand Down Expand Up @@ -755,8 +755,8 @@ These changes are limited to bindings explicitly made lazy:
when it is first used.
* **Proxy visibility.** Before first use, the bound name refers to a lazy
proxy. Indirect introspection that touches the value may observe a proxy
lazy object representation. After first use (provied the module was
imported succesfully), the name is rebound to the real object and becomes
lazy object representation. After first use (provided the module was
imported successfully), the name is rebound to the real object and becomes
indistinguishable from an eager import.

Thread-safety and reification
Expand Down Expand Up @@ -787,7 +787,7 @@ code that doesn't.
Runtime performance
~~~~~~~~~~~~~~~~~~~

After reification (provided the import was succesful), lazy imports have
After reification (provided the import was successful), lazy imports have
**zero overhead**. The adaptive interpreter specializes the bytecode
(typically after 2-3 accesses), eliminating any checks. For example,
``LOAD_GLOBAL`` becomes ``LOAD_GLOBAL_MODULE``, which directly accesses the
Expand Down