]> granicus.if.org Git - python/commitdiff
Warn that AddModule doesn't import the module.
authorGuido van Rossum <guido@python.org>
Mon, 2 Nov 1998 17:02:42 +0000 (17:02 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 2 Nov 1998 17:02:42 +0000 (17:02 +0000)
Doc/api/api.tex

index 48da118962af8ec45d7224607276714177a28e1b..95b31587bd72d21180939367c05aa3c491a52414 100644 (file)
@@ -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}