diff options
author | RĂ©mi Lapeyre <remi.lapeyre@henki.fr> | 2019-08-29 14:49:08 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-08-29 14:49:08 (GMT) |
commit | 4901fe274bc82b95dc89bcb3de8802a3dfedab32 (patch) | |
tree | 2e6e4d0b1cdcb499df7f049ebc9dbbdb9f392bbe /Objects/clinic/funcobject.c.h | |
parent | 59725f3badb3028636c8906ecac4ceb0a37f3982 (diff) | |
download | cpython-4901fe274bc82b95dc89bcb3de8802a3dfedab32.zip cpython-4901fe274bc82b95dc89bcb3de8802a3dfedab32.tar.gz cpython-4901fe274bc82b95dc89bcb3de8802a3dfedab32.tar.bz2 |
bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593)
Diffstat (limited to 'Objects/clinic/funcobject.c.h')
-rw-r--r-- | Objects/clinic/funcobject.c.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 929797b..17fb13f 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -44,12 +44,12 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto exit; } if (!PyObject_TypeCheck(fastargs[0], &PyCode_Type)) { - _PyArg_BadArgument("function", 1, (&PyCode_Type)->tp_name, fastargs[0]); + _PyArg_BadArgument("function", "argument 'code'", (&PyCode_Type)->tp_name, fastargs[0]); goto exit; } code = (PyCodeObject *)fastargs[0]; if (!PyDict_Check(fastargs[1])) { - _PyArg_BadArgument("function", 2, "dict", fastargs[1]); + _PyArg_BadArgument("function", "argument 'globals'", "dict", fastargs[1]); goto exit; } globals = fastargs[1]; @@ -75,4 +75,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=1d01072cd5620d7e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3d96afa3396e5c82 input=a9049054013a1b77]*/ |