[docs] [issue15657] Error in Python 3 docs for PyMethodDef
report at bugs.python.org
Tue Jan 10 03:48:40 EST 2017
Martin Panter added the comment:
The documentation did not get merged properly into 3.6+. And even in 3.5, under METH_KEYWORDS, I propose to change “The flag is typically combined with METH_VARARGS” to “The flag must be combined . . .”.
The remaining issue15657_36.diff patch looks out of date. There is a _PyCFunction_FastCallDict() function that appears to also need adjusting.
But instead of changing the value of METH_KEYWORDS, wouldn’t it be safer to just accept METH_KEYWORDS (= 2) on its own as a valid value? This is what Python 2 does. Essentially, revert the first hunk of
but without METH_OLDARGS, whose value was zero anyway.
BTW, the statement did not need to be removed in Python 2, but IMO it’s fine now without the statment. The statement was added in revision 1564c6839e6b.
versions: +Python 3.7
Python tracker <report at bugs.python.org>
More information about the docs