classification
Title: Poor documentation for METH_KEYWORDS
Type: Stage: resolved
Components: Documentation Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Add documentation for METH_FASTCALL and _PyObject_FastCall*()
View: 28805
Assigned To: docs@python Nosy List: docs@python, iritkatriel, r3m0t
Priority: normal Keywords:

Created on 2012-12-11 16:16 by r3m0t, last changed 2021-06-15 18:46 by iritkatriel. This issue is now closed.

Messages (3)
msg177341 - (view) Author: (r3m0t) Date: 2012-12-11 16:16
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.
msg223120 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-15 17:02
@r3m0t we're sorry about the delay in getting back to you.  Could you write a patch that covers this?
msg395891 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-15 18:46
This part of the documentation was reworded in issue28805, making this issue out of date.
History
Date User Action Args
2021-06-15 18:46:19iritkatrielsetstatus: open -> closed

superseder: Add documentation for METH_FASTCALL and _PyObject_FastCall*()

nosy: + iritkatriel
messages: + msg395891
resolution: duplicate
stage: resolved
2019-04-26 19:39:01BreamoreBoysetnosy: - BreamoreBoy
2014-07-15 17:02:27BreamoreBoysetnosy: + BreamoreBoy

messages: + msg223120
versions: + Python 3.4, Python 3.5, - Python 2.6, Python 3.1, Python 3.2, Python 3.3
2012-12-11 16:16:31r3m0tcreate