summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/import.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-03-14 19:54:52 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-03-14 19:54:52 (GMT)
commitfe93faf98c0866c20f05dc009a8ac2fecee80692 (patch)
tree42249c67dc2ec193951ddec2baf21823d50ce756 /Doc/c-api/import.rst
parent98dbba5d209dda5300df549ef26eb4646cb891f0 (diff)
downloadcpython-fe93faf98c0866c20f05dc009a8ac2fecee80692.zip
cpython-fe93faf98c0866c20f05dc009a8ac2fecee80692.tar.gz
cpython-fe93faf98c0866c20f05dc009a8ac2fecee80692.tar.bz2
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Use it for the builtin __import__ function.
Diffstat (limited to 'Doc/c-api/import.rst')
-rw-r--r--Doc/c-api/import.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst
index 885a752..cf95486 100644
--- a/Doc/c-api/import.rst
+++ b/Doc/c-api/import.rst
@@ -57,7 +57,7 @@ Importing Modules
:c:func:`PyImport_ImportModule`.
-.. c:function:: PyObject* PyImport_ImportModuleLevel(char *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level)
+.. c:function:: PyObject* PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level)
Import a module. This is best described by referring to the built-in Python
function :func:`__import__`, as the standard :func:`__import__` function calls
@@ -68,6 +68,13 @@ Importing Modules
the return value when a submodule of a package was requested is normally the
top-level package, unless a non-empty *fromlist* was given.
+ .. versionadded:: 3.3
+
+
+.. c:function:: PyObject* PyImport_ImportModuleLevel(char *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level)
+
+ Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is an
+ UTF-8 encoded string instead of a Unicode object.
.. c:function:: PyObject* PyImport_Import(PyObject *name)