diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-02-05 09:53:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 09:53:50 (GMT) |
commit | b3f0108eacb7b58c1a2bdd2e4894de23b425d282 (patch) | |
tree | 5fccea9dec0f3f547a01a79da879f6c09e8b7d56 | |
parent | 7f1c5578bbe9461185715ce162baf37eb58689f5 (diff) | |
download | cpython-b3f0108eacb7b58c1a2bdd2e4894de23b425d282.zip cpython-b3f0108eacb7b58c1a2bdd2e4894de23b425d282.tar.gz cpython-b3f0108eacb7b58c1a2bdd2e4894de23b425d282.tar.bz2 |
[3.11] GH-69695: Update ``PyImport_ImportModule`` description (GH-103836) (GH-114924)
GH-69695: Update ``PyImport_ImportModule`` description (GH-103836)
(cherry picked from commit 9872855a31720f514b84373848b49fca09d66ecd)
Co-authored-by: patenaud <33957588+patenaud@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
-rw-r--r-- | Doc/c-api/import.rst | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst index b9694db..61c5232 100644 --- a/Doc/c-api/import.rst +++ b/Doc/c-api/import.rst @@ -13,20 +13,8 @@ Importing Modules single: __all__ (package variable) single: modules (in module sys) - This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, - leaving the *globals* and *locals* arguments set to ``NULL`` and *level* set - to 0. When the *name* - argument contains a dot (when it specifies a submodule of a package), the - *fromlist* argument is set to the list ``['*']`` so that the return value is the - named module rather than the top-level package containing it as would otherwise - be the case. (Unfortunately, this has an additional side effect when *name* in - fact specifies a subpackage instead of a submodule: the submodules specified in - the package's ``__all__`` variable are loaded.) Return a new reference to the - imported module, or ``NULL`` with an exception set on failure. A failing - import of a module doesn't leave the module in :data:`sys.modules`. - - This function always uses absolute imports. - + This is a wrapper around :c:func:`PyImport_Import()` which takes a + :c:expr:`const char *` as an argument instead of a :c:expr:`PyObject *`. .. c:function:: PyObject* PyImport_ImportModuleNoBlock(const char *name) |