[issue15657] Error in Python 3 docs for PyMethodDef

Serhiy Storchaka report at bugs.python.org
Fri Jul 24 17:32:16 CEST 2015


Serhiy Storchaka added the comment:

In 3.5 it would be better to make METH_KEYWORDS == METH_VARARGS | METH_KEYWORDS.

Current definition:

#define METH_VARARGS  0x0001
#define METH_KEYWORDS 0x0002

Should be:

#define METH_VARARGS  0x0001
#define METH_KEYWORDS 0x0003

But it can't be applied in maintained releases. In 3.4 and 2.7 we should add explicit test as in the patch or change the documentation.

If fix the code rather than documentation in 3.4 and 2.7, then the versionchanged directive in 3.5 shouldn't be added.

----------

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


More information about the Python-bugs-list mailing list