summaryrefslogtreecommitdiffstats
path: root/Doc/api
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-11-02 17:02:42 (GMT)
committerGuido van Rossum <guido@python.org>1998-11-02 17:02:42 (GMT)
commita096a2e6a29a6232c72965f179bb4f0c9f762c6a (patch)
tree5dc1492406f2c6271298ef10459d51006dc5fea4 /Doc/api
parent446fd04009cc5d2b490520dca6fe47861088b6fc (diff)
downloadcpython-a096a2e6a29a6232c72965f179bb4f0c9f762c6a.zip
cpython-a096a2e6a29a6232c72965f179bb4f0c9f762c6a.tar.gz
cpython-a096a2e6a29a6232c72965f179bb4f0c9f762c6a.tar.bz2
Warn that AddModule doesn't import the module.
Diffstat (limited to 'Doc/api')
-rw-r--r--Doc/api/api.tex7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex
index 48da118..95b3158 100644
--- a/Doc/api/api.tex
+++ b/Doc/api/api.tex
@@ -983,7 +983,12 @@ Return the module object corresponding to a module name. The
check the modules dictionary if there's one there, and if not, create
a new one and insert in in the modules dictionary. Because the former
action is most common, this does not return a new reference, and you
-do not own the returned reference. Return \NULL{} with an
+do not own the returned reference.
+Warning: 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. \strong{Note:} this function returns
a ``borrowed'' reference.
\end{cfuncdesc}