bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593)
diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h
index b43ce64..20594b0 100644
--- a/Modules/clinic/itertoolsmodule.c.h
+++ b/Modules/clinic/itertoolsmodule.c.h
@@ -66,7 +66,7 @@
goto exit;
}
if (!PyObject_TypeCheck(PyTuple_GET_ITEM(args, 0), &groupby_type)) {
- _PyArg_BadArgument("_grouper", 1, (&groupby_type)->tp_name, PyTuple_GET_ITEM(args, 0));
+ _PyArg_BadArgument("_grouper", "argument 1", (&groupby_type)->tp_name, PyTuple_GET_ITEM(args, 0));
goto exit;
}
parent = PyTuple_GET_ITEM(args, 0);
@@ -104,7 +104,7 @@
}
it = PyTuple_GET_ITEM(args, 0);
if (!PyList_Check(PyTuple_GET_ITEM(args, 1))) {
- _PyArg_BadArgument("teedataobject", 2, "list", PyTuple_GET_ITEM(args, 1));
+ _PyArg_BadArgument("teedataobject", "argument 2", "list", PyTuple_GET_ITEM(args, 1));
goto exit;
}
values = PyTuple_GET_ITEM(args, 1);
@@ -642,4 +642,4 @@
exit:
return return_value;
}
-/*[clinic end generated code: output=04c49debcae96003 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=392c9706e79f6710 input=a9049054013a1b77]*/