From: Benjamin Peterson Date: Tue, 10 May 2016 06:43:53 +0000 (-0700) Subject: improve PyFunction_New docs (closes #26986) X-Git-Tag: v3.6.0a1~49^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=387235085c5a6a1d823b0af3fabb42830c88f984;p=thirdparty%2FPython%2Fcpython.git improve PyFunction_New docs (closes #26986) Patch from Xiang Zhang. --- diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst index 4c74dc874437..17279c732ae0 100644 --- a/Doc/c-api/function.rst +++ b/Doc/c-api/function.rst @@ -34,8 +34,9 @@ There are a few functions specific to Python functions. Return a new function object associated with the code object *code*. *globals* must be a dictionary with the global variables accessible to the function. - The function's docstring, name and *__module__* are retrieved from the code - object, the argument defaults and closure are set to *NULL*. + The function's docstring and name are retrieved from the code object. *__module__* + is retrieved from *globals*. The argument defaults, annotations and closure are + set to *NULL*. *__qualname__* is set to the same value as the function's name. .. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)