diff --git a/peps/pep-0810.rst b/peps/pep-0810.rst index dd6969a8b77..cf9c156bf1b 100644 --- a/peps/pep-0810.rst +++ b/peps/pep-0810.rst @@ -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 @@ -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 @@ -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