diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-09 13:30:29 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-09 13:30:29 (GMT) |
commit | f41b82fb19d1b91f99ab657e4c6a751c44152f12 (patch) | |
tree | d646a40450ae5321aaa384609fb7b027639363e6 /Doc/c-api | |
parent | 339880809a10bc63967b6f94aadc4cd7d406ba54 (diff) | |
download | cpython-f41b82fb19d1b91f99ab657e4c6a751c44152f12.zip cpython-f41b82fb19d1b91f99ab657e4c6a751c44152f12.tar.gz cpython-f41b82fb19d1b91f99ab657e4c6a751c44152f12.tar.bz2 |
Issue #26282: PyArg_ParseTupleAndKeywords() and Argument Clinic now support
positional-only and keyword parameters in the same function.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/arg.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index d9f0f43..d15f649 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -406,8 +406,15 @@ API Functions .. c:function:: int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...) Parse the parameters of a function that takes both positional and keyword - parameters into local variables. Returns true on success; on failure, it - returns false and raises the appropriate exception. + parameters into local variables. The *keywords* argument is a + *NULL*-terminated array of keyword parameter names. Empty names denote + :ref:`positional-only parameters <positional-only_parameter>`. + Returns true on success; on failure, it returns false and raises the + appropriate exception. + + .. versionchanged:: 3.6 + Added support for :ref:`positional-only parameters + <positional-only_parameter>`. .. c:function:: int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], va_list vargs) |