summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-03-16 14:06:20 (GMT)
committerGitHub <noreply@github.com>2020-03-16 14:06:20 (GMT)
commit87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b (patch)
tree8c51144ad1a0b7c88c29e63f1063537096c6c15b /Objects/tupleobject.c
parentc98f87fc330eb40fbcff627dfc50958785a44f35 (diff)
downloadcpython-87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b.zip
cpython-87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b.tar.gz
cpython-87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b.tar.bz2
bpo-37207: Add _PyArg_NoKwnames() helper function (GH-18980)
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c3
1 files changed, 1 insertions, 2 deletions
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 @@ static PyObject *
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;
}