diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/arg.rst | 9 | ||||
-rw-r--r-- | Doc/whatsnew/3.13.rst | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index c43dd0f..62d87d8 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -416,8 +416,10 @@ 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. The *keywords* argument is a - ``NULL``-terminated array of keyword parameter names. Empty names denote + parameters into local variables. + The *keywords* argument is a ``NULL``-terminated array of keyword parameter + names specified as null-terminated ASCII or UTF-8 encoded C strings. + Empty names denote :ref:`positional-only parameters <positional-only_parameter>`. Returns true on success; on failure, it returns false and raises the appropriate exception. @@ -426,6 +428,9 @@ API Functions Added support for :ref:`positional-only parameters <positional-only_parameter>`. + .. versionchanged:: 3.13 + Added support for non-ASCII keyword parameter names. + .. c:function:: int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], va_list vargs) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index dfce976..eb49e01 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1045,6 +1045,10 @@ New Features but pass event arguments as a Python :class:`tuple` object. (Contributed by Victor Stinner in :gh:`85283`.) +* :c:func:`PyArg_ParseTupleAndKeywords` now supports non-ASCII keyword + parameter names. + (Contributed by Serhiy Storchaka in :gh:`110815`.) + Porting to Python 3.13 ---------------------- |