mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
parent
dcfb0e3c04
commit
93952f8815
1 changed files with 4 additions and 5 deletions
|
|
@ -28,11 +28,10 @@ such as the importing of parent packages, and the updating of various caches
|
|||
(including :data:`sys.modules`), only the :keyword:`import` statement performs
|
||||
a name binding operation.
|
||||
|
||||
When calling :func:`__import__` as part of an import statement, the
|
||||
standard builtin :func:`__import__` is called. Other mechanisms for
|
||||
invoking the import system (such as :func:`importlib.import_module`) may
|
||||
choose to subvert :func:`__import__` and use its own solution to
|
||||
implement import semantics.
|
||||
When an :keyword:`import` statement is executed, the standard builtin
|
||||
:func:`__import__` function is called. Other mechanisms for invoking the
|
||||
import system (such as :func:`importlib.import_module`) may choose to bypass
|
||||
:func:`__import__` and use their own solutions to implement import semantics.
|
||||
|
||||
When a module is first imported, Python searches for the module and if found,
|
||||
it creates a module object [#fnmo]_, initializing it. If the named module
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue