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 | |
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')
-rw-r--r-- | Objects/clinic/bytearrayobject.c.h | 16 | ||||
-rw-r--r-- | Objects/clinic/bytesobject.c.h | 20 | ||||
-rw-r--r-- | Objects/clinic/codeobject.c.h | 20 | ||||
-rw-r--r-- | Objects/clinic/floatobject.c.h | 10 | ||||
-rw-r--r-- | Objects/clinic/funcobject.c.h | 6 | ||||
-rw-r--r-- | Objects/clinic/longobject.c.h | 8 | ||||
-rw-r--r-- | Objects/clinic/moduleobject.c.h | 4 | ||||
-rw-r--r-- | Objects/clinic/typeobject.c.h | 4 | ||||
-rw-r--r-- | Objects/clinic/unicodeobject.c.h | 16 | ||||
-rw-r--r-- | Objects/stringlib/clinic/transmogrify.h.h | 8 |
10 files changed, 56 insertions, 56 deletions
diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index 08c6eb5..ad8ed7e 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -115,14 +115,14 @@ bytearray_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs) goto exit; } if (!PyBuffer_IsContiguous(&frm, 'C')) { - _PyArg_BadArgument("maketrans", 1, "contiguous buffer", args[0]); + _PyArg_BadArgument("maketrans", "argument 1", "contiguous buffer", args[0]); goto exit; } if (PyObject_GetBuffer(args[1], &to, PyBUF_SIMPLE) != 0) { goto exit; } if (!PyBuffer_IsContiguous(&to, 'C')) { - _PyArg_BadArgument("maketrans", 2, "contiguous buffer", args[1]); + _PyArg_BadArgument("maketrans", "argument 2", "contiguous buffer", args[1]); goto exit; } return_value = bytearray_maketrans_impl(&frm, &to); @@ -175,14 +175,14 @@ bytearray_replace(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nar goto exit; } if (!PyBuffer_IsContiguous(&old, 'C')) { - _PyArg_BadArgument("replace", 1, "contiguous buffer", args[0]); + _PyArg_BadArgument("replace", "argument 1", "contiguous buffer", args[0]); goto exit; } if (PyObject_GetBuffer(args[1], &new, PyBUF_SIMPLE) != 0) { goto exit; } if (!PyBuffer_IsContiguous(&new, 'C')) { - _PyArg_BadArgument("replace", 2, "contiguous buffer", args[1]); + _PyArg_BadArgument("replace", "argument 2", "contiguous buffer", args[1]); goto exit; } if (nargs < 3) { @@ -735,7 +735,7 @@ bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg } if (args[0]) { if (!PyUnicode_Check(args[0])) { - _PyArg_BadArgument("decode", 1, "str", args[0]); + _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[0]); goto exit; } Py_ssize_t encoding_length; @@ -752,7 +752,7 @@ bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg } } if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("decode", 2, "str", args[1]); + _PyArg_BadArgument("decode", "argument 'errors'", "str", args[1]); goto exit; } Py_ssize_t errors_length; @@ -854,7 +854,7 @@ bytearray_fromhex(PyTypeObject *type, PyObject *arg) PyObject *string; if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("fromhex", 0, "str", arg); + _PyArg_BadArgument("fromhex", "argument", "str", arg); goto exit; } if (PyUnicode_READY(arg) == -1) { @@ -1011,4 +1011,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=7848247e5469ba1b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=09df354d3374dfb2 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 69c3506..7e2ce1a 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -99,7 +99,7 @@ bytes_partition(PyBytesObject *self, PyObject *arg) goto exit; } if (!PyBuffer_IsContiguous(&sep, 'C')) { - _PyArg_BadArgument("partition", 0, "contiguous buffer", arg); + _PyArg_BadArgument("partition", "argument", "contiguous buffer", arg); goto exit; } return_value = bytes_partition_impl(self, &sep); @@ -142,7 +142,7 @@ bytes_rpartition(PyBytesObject *self, PyObject *arg) goto exit; } if (!PyBuffer_IsContiguous(&sep, 'C')) { - _PyArg_BadArgument("rpartition", 0, "contiguous buffer", arg); + _PyArg_BadArgument("rpartition", "argument", "contiguous buffer", arg); goto exit; } return_value = bytes_rpartition_impl(self, &sep); @@ -420,14 +420,14 @@ bytes_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs) goto exit; } if (!PyBuffer_IsContiguous(&frm, 'C')) { - _PyArg_BadArgument("maketrans", 1, "contiguous buffer", args[0]); + _PyArg_BadArgument("maketrans", "argument 1", "contiguous buffer", args[0]); goto exit; } if (PyObject_GetBuffer(args[1], &to, PyBUF_SIMPLE) != 0) { goto exit; } if (!PyBuffer_IsContiguous(&to, 'C')) { - _PyArg_BadArgument("maketrans", 2, "contiguous buffer", args[1]); + _PyArg_BadArgument("maketrans", "argument 2", "contiguous buffer", args[1]); goto exit; } return_value = bytes_maketrans_impl(&frm, &to); @@ -480,14 +480,14 @@ bytes_replace(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs) goto exit; } if (!PyBuffer_IsContiguous(&old, 'C')) { - _PyArg_BadArgument("replace", 1, "contiguous buffer", args[0]); + _PyArg_BadArgument("replace", "argument 1", "contiguous buffer", args[0]); goto exit; } if (PyObject_GetBuffer(args[1], &new, PyBUF_SIMPLE) != 0) { goto exit; } if (!PyBuffer_IsContiguous(&new, 'C')) { - _PyArg_BadArgument("replace", 2, "contiguous buffer", args[1]); + _PyArg_BadArgument("replace", "argument 2", "contiguous buffer", args[1]); goto exit; } if (nargs < 3) { @@ -568,7 +568,7 @@ bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj } if (args[0]) { if (!PyUnicode_Check(args[0])) { - _PyArg_BadArgument("decode", 1, "str", args[0]); + _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[0]); goto exit; } Py_ssize_t encoding_length; @@ -585,7 +585,7 @@ bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj } } if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("decode", 2, "str", args[1]); + _PyArg_BadArgument("decode", "argument 'errors'", "str", args[1]); goto exit; } Py_ssize_t errors_length; @@ -674,7 +674,7 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg) PyObject *string; if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("fromhex", 0, "str", arg); + _PyArg_BadArgument("fromhex", "argument", "str", arg); goto exit; } if (PyUnicode_READY(arg) == -1) { @@ -755,4 +755,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=2d0a3733e13e753a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dbed3c3ff6faa382 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index ec127ce..6596de0 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -158,7 +158,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[7]) { if (!PyBytes_Check(args[7])) { - _PyArg_BadArgument("replace", 8, "bytes", args[7]); + _PyArg_BadArgument("replace", "argument 'co_code'", "bytes", args[7]); goto exit; } co_code = (PyBytesObject *)args[7]; @@ -168,7 +168,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[8]) { if (!PyTuple_Check(args[8])) { - _PyArg_BadArgument("replace", 9, "tuple", args[8]); + _PyArg_BadArgument("replace", "argument 'co_consts'", "tuple", args[8]); goto exit; } co_consts = args[8]; @@ -178,7 +178,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[9]) { if (!PyTuple_Check(args[9])) { - _PyArg_BadArgument("replace", 10, "tuple", args[9]); + _PyArg_BadArgument("replace", "argument 'co_names'", "tuple", args[9]); goto exit; } co_names = args[9]; @@ -188,7 +188,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[10]) { if (!PyTuple_Check(args[10])) { - _PyArg_BadArgument("replace", 11, "tuple", args[10]); + _PyArg_BadArgument("replace", "argument 'co_varnames'", "tuple", args[10]); goto exit; } co_varnames = args[10]; @@ -198,7 +198,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[11]) { if (!PyTuple_Check(args[11])) { - _PyArg_BadArgument("replace", 12, "tuple", args[11]); + _PyArg_BadArgument("replace", "argument 'co_freevars'", "tuple", args[11]); goto exit; } co_freevars = args[11]; @@ -208,7 +208,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[12]) { if (!PyTuple_Check(args[12])) { - _PyArg_BadArgument("replace", 13, "tuple", args[12]); + _PyArg_BadArgument("replace", "argument 'co_cellvars'", "tuple", args[12]); goto exit; } co_cellvars = args[12]; @@ -218,7 +218,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[13]) { if (!PyUnicode_Check(args[13])) { - _PyArg_BadArgument("replace", 14, "str", args[13]); + _PyArg_BadArgument("replace", "argument 'co_filename'", "str", args[13]); goto exit; } if (PyUnicode_READY(args[13]) == -1) { @@ -231,7 +231,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } if (args[14]) { if (!PyUnicode_Check(args[14])) { - _PyArg_BadArgument("replace", 15, "str", args[14]); + _PyArg_BadArgument("replace", "argument 'co_name'", "str", args[14]); goto exit; } if (PyUnicode_READY(args[14]) == -1) { @@ -243,7 +243,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje } } if (!PyBytes_Check(args[15])) { - _PyArg_BadArgument("replace", 16, "bytes", args[15]); + _PyArg_BadArgument("replace", "argument 'co_lnotab'", "bytes", args[15]); goto exit; } co_lnotab = (PyBytesObject *)args[15]; @@ -253,4 +253,4 @@ skip_optional_kwonly: exit: return return_value; } -/*[clinic end generated code: output=624ab6f2ea8f0ea4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fade581d6313a0c2 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/floatobject.c.h b/Objects/clinic/floatobject.c.h index 4251d63..6515d11 100644 --- a/Objects/clinic/floatobject.c.h +++ b/Objects/clinic/floatobject.c.h @@ -235,7 +235,7 @@ float___getformat__(PyTypeObject *type, PyObject *arg) const char *typestr; if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("__getformat__", 0, "str", arg); + _PyArg_BadArgument("__getformat__", "argument", "str", arg); goto exit; } Py_ssize_t typestr_length; @@ -289,7 +289,7 @@ float___set_format__(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs goto exit; } if (!PyUnicode_Check(args[0])) { - _PyArg_BadArgument("__set_format__", 1, "str", args[0]); + _PyArg_BadArgument("__set_format__", "argument 1", "str", args[0]); goto exit; } Py_ssize_t typestr_length; @@ -302,7 +302,7 @@ float___set_format__(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs goto exit; } if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("__set_format__", 2, "str", args[1]); + _PyArg_BadArgument("__set_format__", "argument 2", "str", args[1]); goto exit; } Py_ssize_t fmt_length; @@ -339,7 +339,7 @@ float___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) { @@ -351,4 +351,4 @@ float___format__(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=c183029d87dd41fa input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cc8098eb73f1a64c input=a9049054013a1b77]*/ 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]*/ 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]*/ diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index 512edee..c1534ea 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -31,7 +31,7 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto exit; } if (!PyUnicode_Check(fastargs[0])) { - _PyArg_BadArgument("module", 1, "str", fastargs[0]); + _PyArg_BadArgument("module", "argument 'name'", "str", fastargs[0]); goto exit; } if (PyUnicode_READY(fastargs[0]) == -1) { @@ -48,4 +48,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=d7b7ca1237597b08 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=680276bc3a496d7a input=a9049054013a1b77]*/ diff --git a/Objects/clinic/typeobject.c.h b/Objects/clinic/typeobject.c.h index fbe1261..357eb44 100644 --- a/Objects/clinic/typeobject.c.h +++ b/Objects/clinic/typeobject.c.h @@ -200,7 +200,7 @@ object___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) { @@ -248,4 +248,4 @@ object___dir__(PyObject *self, PyObject *Py_UNUSED(ignored)) { return object___dir___impl(self); } -/*[clinic end generated code: output=ea5734413064fa7e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7a6d272d282308f3 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index 647507d..cb35087 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -157,7 +157,7 @@ unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject } if (args[0]) { if (!PyUnicode_Check(args[0])) { - _PyArg_BadArgument("encode", 1, "str", args[0]); + _PyArg_BadArgument("encode", "argument 'encoding'", "str", args[0]); goto exit; } Py_ssize_t encoding_length; @@ -174,7 +174,7 @@ unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject } } if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("encode", 2, "str", args[1]); + _PyArg_BadArgument("encode", "argument 'errors'", "str", args[1]); goto exit; } Py_ssize_t errors_length; @@ -712,7 +712,7 @@ unicode_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs) goto exit; } if (!PyUnicode_Check(args[0])) { - _PyArg_BadArgument("replace", 1, "str", args[0]); + _PyArg_BadArgument("replace", "argument 1", "str", args[0]); goto exit; } if (PyUnicode_READY(args[0]) == -1) { @@ -720,7 +720,7 @@ unicode_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs) } old = args[0]; if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("replace", 2, "str", args[1]); + _PyArg_BadArgument("replace", "argument 2", "str", args[1]); goto exit; } if (PyUnicode_READY(args[1]) == -1) { @@ -1080,7 +1080,7 @@ unicode_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs) goto skip_optional; } if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("maketrans", 2, "str", args[1]); + _PyArg_BadArgument("maketrans", "argument 2", "str", args[1]); goto exit; } if (PyUnicode_READY(args[1]) == -1) { @@ -1091,7 +1091,7 @@ unicode_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs) goto skip_optional; } if (!PyUnicode_Check(args[2])) { - _PyArg_BadArgument("maketrans", 3, "str", args[2]); + _PyArg_BadArgument("maketrans", "argument 3", "str", args[2]); goto exit; } if (PyUnicode_READY(args[2]) == -1) { @@ -1202,7 +1202,7 @@ unicode___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) { @@ -1232,4 +1232,4 @@ unicode_sizeof(PyObject *self, PyObject *Py_UNUSED(ignored)) { return unicode_sizeof_impl(self); } -/*[clinic end generated code: output=d1541724cb4a0070 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d9a6ee45ddd0ccfd input=a9049054013a1b77]*/ diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index 0c53a75..8a3a060 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -100,7 +100,7 @@ stringlib_ljust(PyObject *self, PyObject *const *args, Py_ssize_t nargs) fillchar = PyByteArray_AS_STRING(args[1])[0]; } else { - _PyArg_BadArgument("ljust", 2, "a byte string of length 1", args[1]); + _PyArg_BadArgument("ljust", "argument 2", "a byte string of length 1", args[1]); goto exit; } skip_optional: @@ -161,7 +161,7 @@ stringlib_rjust(PyObject *self, PyObject *const *args, Py_ssize_t nargs) fillchar = PyByteArray_AS_STRING(args[1])[0]; } else { - _PyArg_BadArgument("rjust", 2, "a byte string of length 1", args[1]); + _PyArg_BadArgument("rjust", "argument 2", "a byte string of length 1", args[1]); goto exit; } skip_optional: @@ -222,7 +222,7 @@ stringlib_center(PyObject *self, PyObject *const *args, Py_ssize_t nargs) fillchar = PyByteArray_AS_STRING(args[1])[0]; } else { - _PyArg_BadArgument("center", 2, "a byte string of length 1", args[1]); + _PyArg_BadArgument("center", "argument 2", "a byte string of length 1", args[1]); goto exit; } skip_optional: @@ -274,4 +274,4 @@ stringlib_zfill(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=96cbb19b238d0e84 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=15be047aef999b4e input=a9049054013a1b77]*/ |