mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-37207: Add _PyArg_NoKwnames() helper function (GH-18980)
This commit is contained in:
parent
c98f87fc33
commit
87ec86c425
5 changed files with 24 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue