mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593)
This commit is contained in:
parent
59725f3bad
commit
4901fe274b
62 changed files with 623 additions and 553 deletions
6
Python/clinic/sysmodule.c.h
generated
6
Python/clinic/sysmodule.c.h
generated
|
@ -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]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue