Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a096a2e

Browse files
committed
Warn that AddModule doesn't import the module.
1 parent 446fd04 commit a096a2e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/api/api.tex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,12 @@ \section{Importing Modules}
983983
check the modules dictionary if there's one there, and if not, create
984984
a new one and insert in in the modules dictionary. Because the former
985985
action is most common, this does not return a new reference, and you
986-
do not own the returned reference. Return \NULL{} with an
986+
do not own the returned reference.
987+
Warning: this function does not load or import the module; if the
988+
module wasn't already loaded, you will get an empty module object.
989+
Use \cfunction{PyImport_ImportModule()} or one of its variants to
990+
import a module.
991+
Return \NULL{} with an
987992
exception set on failure. \strong{Note:} this function returns
988993
a ``borrowed'' reference.
989994
\end{cfuncdesc}

0 commit comments

Comments
 (0)