From 9da31f7274472903a32407a4e8227d1f295672a6 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Wed, 11 Jan 2017 11:41:03 +0000 Subject: [PATCH 1/2] Issue #15657: METH_KEYWORDS cannot be used alone in Python 3 --- Doc/c-api/structures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 3e8a90cb7cb..f48119391f2 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -168,7 +168,7 @@ can be combined with a binding flag. Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. The function expects three parameters: *self*, *args*, and a dictionary of - all the keyword arguments. The flag is typically combined with + all the keyword arguments. The flag must be combined with :const:`METH_VARARGS`, and the parameters are typically processed using :c:func:`PyArg_ParseTupleAndKeywords`. From 5b66723b0be684bc27414029ea3570c2400580f2 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Wed, 11 Jan 2017 11:50:06 +0000 Subject: [PATCH 2/2] Issue #15657: Delete incorrect statement from PyMethodDef documentation Patch by Berker Peksag. --- Doc/c-api/structures.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 837ac7daa51..3e8a90cb7cb 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -150,9 +150,8 @@ specific C type of the *self* object. The :attr:`ml_flags` field is a bitfield which can include the following flags. The individual flags indicate either a calling convention or a binding convention. Of the calling convention flags, only :const:`METH_VARARGS` and -:const:`METH_KEYWORDS` can be combined (but note that :const:`METH_KEYWORDS` -alone is equivalent to ``METH_VARARGS | METH_KEYWORDS``). Any of the calling -convention flags can be combined with a binding flag. +:const:`METH_KEYWORDS` can be combined. Any of the calling convention flags +can be combined with a binding flag. .. data:: METH_VARARGS