[issue11587] METH_KEYWORDS alone gives "METH_OLDARGS is no longer supported!"

Antti Haapala report at bugs.python.org
Sun Apr 19 14:59:01 CEST 2015


Antti Haapala added the comment:

This is *still* there in Hg tip: PyCFunction_Call in Objects/methodobject.c does not have a case for `METH_KEYWORDS` only at all.

The documentation for METH_KEYWORDS says that it is *typically* coupled with METH_VARARGS; however not having the case means that METH_KEYWORDS *cannot* be used without METH_VARARGS at all.

Furthermore, the default case should actually report the wrong flags value instead of calling it the "METH_OLDARGS", since it can be caused by any future combination, by setting it to zero, or undefined behaviour causing the flag to be overwritten.

----------
nosy: +ztane

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11587>
_______________________________________


More information about the Python-bugs-list mailing list