Skip to content

Commit b18af22

Browse files
pablogsalYhg1s
andauthored
Update pep-0810.rst
Co-authored-by: T. Wouters <thomas@python.org>
1 parent e028ff3 commit b18af22

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

peps/pep-0810.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,15 @@ the object. Calling ``dir()`` at the global scope will not reify the globals
465465
and calling ``dir(mod)`` will be special cased in ``mod.__dir__`` to avoid
466466
reification as well.
467467

468-
However, calling ``globals()`` or accessing a module's ``__dict__`` does **not**
469-
trigger reification -- they return the module's dictionary, and accessing lazy
470-
objects through that dictionary still returns lazy proxy objects that need to
471-
be manually reified upon use. A lazy object can be resolved explicitly by
472-
calling the ``resolve`` method. Other, more indirect ways of accessing
473-
arbitrary globals (e.g. inspecting ``frame.f_globals``) also do **not** reify
474-
all the objects.
468+
However, calling ``globals()`` or accessing a module's ``__dict__`` does
469+
**not** trigger reification -- they return the module's dictionary, and
470+
accessing lazy objects through that dictionary still returns lazy proxy
471+
objects that need to be manually reified upon use. A lazy object can be
472+
resolved explicitly by calling the ``resolve`` method. Calling ``dir()`` at
473+
the global scope will not reify the globals, nor will calling ``dir(mod)``
474+
(through special-casing in ``mod.__dir__``.) Other, more indirect ways of
475+
accessing arbitrary globals (e.g. inspecting ``frame.f_globals``) also do
476+
**not** reify all the objects.
475477

476478
Example using ``globals()`` and ``__dict__``:
477479

0 commit comments

Comments
 (0)