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

https://hg.python.org/cpython/diff/b7bfa780a882/Objects/methodobject.c

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.

----------
nosy: +martin.panter
versions: +Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to