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/longobject.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/longobject.c.h')
-rw-r--r-- | Objects/clinic/longobject.c.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 453edba..27e8dfe 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -74,7 +74,7 @@ int___format__(PyObject *self, PyObject *arg) PyObject *format_spec; if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("__format__", 0, "str", arg); + _PyArg_BadArgument("__format__", "argument", "str", arg); goto exit; } if (PyUnicode_READY(arg) == -1) { @@ -227,7 +227,7 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * length = ival; } if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("to_bytes", 2, "str", args[1]); + _PyArg_BadArgument("to_bytes", "argument 'byteorder'", "str", args[1]); goto exit; } if (PyUnicode_READY(args[1]) == -1) { @@ -293,7 +293,7 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb } bytes_obj = args[0]; if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("from_bytes", 2, "str", args[1]); + _PyArg_BadArgument("from_bytes", "argument 'byteorder'", "str", args[1]); goto exit; } if (PyUnicode_READY(args[1]) == -1) { @@ -313,4 +313,4 @@ skip_optional_kwonly: exit: return return_value; } -/*[clinic end generated code: output=709503897c55bca1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=77bc3b2615822cb8 input=a9049054013a1b77]*/ |