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

Skip to content

Commit f495ef7

Browse files
committed
Warn people away from PyModule_GetDict(), but not too strongly.
(The real issue is whether modules can benefit from an alternate implementation strategy rather than using a dictionary. We should migrate away from direct dictionary manipulation to allow more room for Jeremy to flex the implementation with changes in globals lookup.)
1 parent c69343b commit f495ef7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Doc/api/concrete.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,6 +2111,9 @@ \subsection{Module Objects \label{moduleObjects}}
21112111
namespace; this object is the same as the \member{__dict__}
21122112
attribute of the module object. This function never fails.
21132113
\withsubitem{(module attribute)}{\ttindex{__dict__}}
2114+
It is recommended extensions use other \cfunction{PyModule_*()}
2115+
and \cfunction{PyObject_*()} functions rather than directly
2116+
manipulate a module's \member{__dict__}.
21142117
\end{cfuncdesc}
21152118

21162119
\begin{cfuncdesc}{char*}{PyModule_GetName}{PyObject *module}

0 commit comments

Comments
 (0)