diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-04-24 18:21:17 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-04-24 18:21:17 (GMT) |
commit | fb88636199c12f63d6c8c89f311cdafc91f30d2f (patch) | |
tree | 24b2758c45ac543fe9970f861ca091852a8f4a94 /Doc/c-api | |
parent | b962171414aa2cfe3dbfbd4294819a4153a7bd6c (diff) | |
download | cpython-fb88636199c12f63d6c8c89f311cdafc91f30d2f.zip cpython-fb88636199c12f63d6c8c89f311cdafc91f30d2f.tar.gz cpython-fb88636199c12f63d6c8c89f311cdafc91f30d2f.tar.bz2 |
prevent the dict constructor from accepting non-string keyword args #8419
This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments
are all strings, using an optimized method if possible.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/arg.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index fc4b941..a4e5555 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -366,6 +366,13 @@ and the following format units are left untouched. va_list rather than a variable number of arguments. +.. cfunction:: int PyArg_ValidateKeywordArguments(PyObject *) + + Ensure that the keys in the keywords argument dictionary are strings. This + is only needed if :cfunc:`PyArg_ParseTupleAndKeywords` is not used, since the + latter already does this check. + + .. XXX deprecated, will be removed .. cfunction:: int PyArg_Parse(PyObject *args, const char *format, ...) |