commit | 87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b | [log] [tgz] |
---|---|---|
author | Dong-hee Na <donghee.na92@gmail.com> | Mon Mar 16 23:06:20 2020 +0900 |
committer | GitHub <noreply@github.com> | Mon Mar 16 15:06:20 2020 +0100 |
tree | 8c51144ad1a0b7c88c29e63f1063537096c6c15b | |
parent | c98f87fc330eb40fbcff627dfc50958785a44f35 [diff] [blame] |
bpo-37207: Add _PyArg_NoKwnames() helper function (GH-18980)
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index d4165de..8a8c6ae 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c
@@ -709,8 +709,7 @@ tuple_vectorcall(PyObject *type, PyObject * const*args, size_t nargsf, PyObject *kwnames) { - if (kwnames && PyTuple_GET_SIZE(kwnames) != 0) { - PyErr_Format(PyExc_TypeError, "tuple() takes no keyword arguments"); + if (!_PyArg_NoKwnames("tuple", kwnames)) { return NULL; }