[New-bugs-announce] [issue16663] Poor documentation for METH_KEYWORDS

r3m0t report at bugs.python.org
Tue Dec 11 17:16:31 CET 2012


New submission from r3m0t:

http://docs.python.org/3.3/c-api/structures.html#METH_KEYWORDS

"Methods with these flags must be of type PyCFunctionWithKeywords. The function expects three parameters: self, args, and a dictionary of all the keyword arguments. The flag is typically combined with METH_VARARGS, and the parameters are typically processed using PyArg_ParseTupleAndKeywords()."

The documentation doesn't mention the args/dictionary arguments will be NULL when there are no positional/keyword arguments. It might also be worth mentioning the arguments are in effect "borrowed" references.

----------
assignee: docs at python
components: Documentation
messages: 177341
nosy: docs at python, r3m0t
priority: normal
severity: normal
status: open
title: Poor documentation for METH_KEYWORDS
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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


More information about the New-bugs-announce mailing list