Issue #12946: Document that PyModule_GetDict can fail in some cases
This commit is contained in:
parent
db5380517f
commit
c01e766b54
|
@ -59,10 +59,13 @@ Module Objects
|
||||||
.. index:: single: __dict__ (module attribute)
|
.. index:: single: __dict__ (module attribute)
|
||||||
|
|
||||||
Return the dictionary object that implements *module*'s namespace; this object
|
Return the dictionary object that implements *module*'s namespace; this object
|
||||||
is the same as the :attr:`~object.__dict__` attribute of the module object. This
|
is the same as the :attr:`~object.__dict__` attribute of the module object.
|
||||||
function never fails. It is recommended extensions use other
|
If *module* is not a module object (or a subtype of a module object),
|
||||||
:c:func:`PyModule_\*` and :c:func:`PyObject_\*` functions rather than directly
|
:exc:`SystemError` is raised and *NULL* is returned.
|
||||||
manipulate a module's :attr:`~object.__dict__`.
|
|
||||||
|
It is recommended extensions use other :c:func:`PyModule_\*` and
|
||||||
|
:c:func:`PyObject_\*` functions rather than directly manipulate a module's
|
||||||
|
:attr:`~object.__dict__`.
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: PyObject* PyModule_GetNameObject(PyObject *module)
|
.. c:function:: PyObject* PyModule_GetNameObject(PyObject *module)
|
||||||
|
|
Loading…
Reference in New Issue