@@ -368,7 +368,7 @@ Lazy modules, as well as names lazy imported from modules, are represented
368368by :class: `!types.LazyImportType ` instances, which are resolved to the real
369369object (reified) before they can be used. This reification is usually done
370370automatically (see below), but can also be done by calling the lazy object's
371- ``get `` method.
371+ ``resolve `` method.
372372
373373Lazy import mechanism
374374---------------------
@@ -493,8 +493,8 @@ Example using ``__dict__`` from external code:
493493 However, calling ``globals() `` does **not ** trigger reification -- it returns
494494the module's dictionary, and accessing lazy objects through that dictionary
495495still returns lazy proxy objects that need to be manually reified upon use. A
496- lazy object can be resolved explicitly by calling the ``get `` method. Other,
497- more indirect ways of accessing arbitrary globals (e.g. inspecting
496+ lazy object can be resolved explicitly by calling the ``resolve `` method.
497+ Other, more indirect ways of accessing arbitrary globals (e.g. inspecting
498498``frame.f_globals ``) also do **not ** reify all the objects.
499499
500500Example using ``globals() ``:
@@ -510,8 +510,8 @@ Example using ``globals()``:
510510 print (' json' in sys.modules) # False - still lazy
511511 print (type (g[' json' ])) # <class 'LazyImport'>
512512
513- # Explicitly reify using the get () method
514- resolved = g[' json' ].get ()
513+ # Explicitly reify using the resolve () method
514+ resolved = g[' json' ].resolve ()
515515
516516 print (type (resolved)) # <class 'module'>
517517 print (' json' in sys.modules) # True - now loaded
@@ -1252,7 +1252,7 @@ Can I force reification of a lazy import without using it?
12521252----------------------------------------------------------
12531253
12541254Yes, accessing a module's ``__dict__ `` will reify all lazy objects in that
1255- module. Individual lazy objects can be resolved by calling their ``get () ``
1255+ module. Individual lazy objects can be resolved by calling their ``resolve () ``
12561256method.
12571257
12581258What's the difference between ``globals() `` and ``mod.__dict__ `` for lazy imports?
0 commit comments