summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-11-13 15:13:38 (GMT)
committerFred Drake <fdrake@acm.org>2002-11-13 15:13:38 (GMT)
commit674dae245a61b6519238cac8529c6ac83721f880 (patch)
tree8d85d2aa17f6b29bbc6d134854ad07b0f1d0f00d
parent5c4cf1587b5303f1dda23e5de334e0196e520143 (diff)
downloadcpython-674dae245a61b6519238cac8529c6ac83721f880.zip
cpython-674dae245a61b6519238cac8529c6ac83721f880.tar.gz
cpython-674dae245a61b6519238cac8529c6ac83721f880.tar.bz2
Clarify that PyImport_AddModule() and PyImport_ExecCodeModule() don't
add any package support structure even if a dotted-name is passed for the module. Closes SF bug #424106.
-rw-r--r--Doc/api/utilities.tex10
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/api/utilities.tex b/Doc/api/utilities.tex
index ae04c40..357ca0a 100644
--- a/Doc/api/utilities.tex
+++ b/Doc/api/utilities.tex
@@ -148,10 +148,12 @@ values from C values.
\var{name} argument may be of the form \code{package.module}).
First check the modules dictionary if there's one there, and if not,
create a new one and insert in in the modules dictionary.
+ Return \NULL{} with an exception set on failure.
\note{This function does not load or import the module; if the
module wasn't already loaded, you will get an empty module object.
Use \cfunction{PyImport_ImportModule()} or one of its variants to
- import a module. Return \NULL{} with an exception set on failure.}
+ import a module. Package structures implied by a dotted name for
+ \var{name} are not created if not already present.}
\end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyImport_ExecCodeModule}{char *name, PyObject *co}
@@ -160,8 +162,10 @@ values from C values.
built-in function \function{compile()}\bifuncindex{compile}, load
the module. Return a new reference to the module object, or \NULL{}
with an exception set if an error occurred (the module may still be
- created in this case). (This function would reload the module if it
- was already imported.)
+ created in this case). This function would reload the module if it
+ was already imported. If \var{name} points to a dotted name of the
+ form \code{package.module}, any package structures not already
+ created will still not be created.
\end{cfuncdesc}
\begin{cfuncdesc}{long}{PyImport_GetMagicNumber}{}