diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-08-19 08:52:08 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-08-19 08:52:08 (GMT) |
commit | 7a01508bbe5fbe5dd31d395d3b7074a643b689a3 (patch) | |
tree | 64242bfb1c89000c94df963576727faf770d778c /Doc | |
parent | 3f015a64b83fd243c165147d225cb37dc7e3e645 (diff) | |
parent | c01e766b54700ed4140c0d414a1e6c957b461519 (diff) | |
download | cpython-7a01508bbe5fbe5dd31d395d3b7074a643b689a3.zip cpython-7a01508bbe5fbe5dd31d395d3b7074a643b689a3.tar.gz cpython-7a01508bbe5fbe5dd31d395d3b7074a643b689a3.tar.bz2 |
Issue #12946: Merge from 3.5
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/module.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 34f8443..e810c69 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -59,10 +59,13 @@ Module Objects .. index:: single: __dict__ (module attribute) 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 - function never fails. It is recommended extensions use other - :c:func:`PyModule_\*` and :c:func:`PyObject_\*` functions rather than directly - manipulate a module's :attr:`~object.__dict__`. + is the same as the :attr:`~object.__dict__` attribute of the module object. + If *module* is not a module object (or a subtype of a module object), + :exc:`SystemError` is raised and *NULL* is returned. + + 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) |