[Python-checkins] cpython (merge 3.5 -> default): Issue #12946: Merge from 3.5

berker.peksag python-checkins at python.org
Fri Aug 19 04:51:42 EDT 2016


https://hg.python.org/cpython/rev/c2e74b88947d
changeset:   102751:c2e74b88947d
parent:      102749:c3498187f998
parent:      102750:bd2a4c138b76
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Fri Aug 19 11:52:08 2016 +0300
summary:
  Issue #12946: Merge from 3.5

files:
  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
--- a/Doc/c-api/module.rst
+++ b/Doc/c-api/module.rst
@@ -59,10 +59,13 @@
    .. 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)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list