diff Doc/api/api.tex @ 9476:1ea6d2356e52 legacy-trunk

Warn that AddModule doesn't import the module.
author Guido van Rossum <guido@python.org>
date Mon, 02 Nov 1998 17:02:42 +0000
parents 2b34461ba4a3
children 00fc18ac6aeb
line wrap: on
line diff
--- a/Doc/api/api.tex	Mon Nov 02 16:21:39 1998 +0000
+++ b/Doc/api/api.tex	Mon Nov 02 17:02:42 1998 +0000
@@ -983,7 +983,12 @@
 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}