bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593)

This commit is contained in:
Rémi Lapeyre 2019-08-29 16:49:08 +02:00 committed by Serhiy Storchaka
parent 59725f3bad
commit 4901fe274b
62 changed files with 623 additions and 553 deletions

View file

@ -228,7 +228,7 @@ sys_intern(PyObject *module, PyObject *arg)
PyObject *s;
if (!PyUnicode_Check(arg)) {
_PyArg_BadArgument("intern", 0, "str", arg);
_PyArg_BadArgument("intern", "argument", "str", arg);
goto exit;
}
if (PyUnicode_READY(arg) == -1) {
@ -875,7 +875,7 @@ sys_call_tracing(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
}
func = args[0];
if (!PyTuple_Check(args[1])) {
_PyArg_BadArgument("call_tracing", 2, "tuple", args[1]);
_PyArg_BadArgument("call_tracing", "argument 2", "tuple", args[1]);
goto exit;
}
funcargs = args[1];
@ -995,4 +995,4 @@ sys_getandroidapilevel(PyObject *module, PyObject *Py_UNUSED(ignored))
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
#define SYS_GETANDROIDAPILEVEL_METHODDEF
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
/*[clinic end generated code: output=b26faa0abdd700da input=a9049054013a1b77]*/
/*[clinic end generated code: output=8b250245a1265eef input=a9049054013a1b77]*/