summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs
diff options
context:
space:
mode:
authorRĂ©mi Lapeyre <remi.lapeyre@henki.fr>2019-08-29 14:49:08 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-08-29 14:49:08 (GMT)
commit4901fe274bc82b95dc89bcb3de8802a3dfedab32 (patch)
tree2e6e4d0b1cdcb499df7f049ebc9dbbdb9f392bbe /Modules/cjkcodecs
parent59725f3badb3028636c8906ecac4ceb0a37f3982 (diff)
downloadcpython-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 'Modules/cjkcodecs')
-rw-r--r--Modules/cjkcodecs/clinic/multibytecodec.c.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h
index 84774f0..5ddbbe2 100644
--- a/Modules/cjkcodecs/clinic/multibytecodec.c.h
+++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h
@@ -55,7 +55,7 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *cons
}
}
else {
- _PyArg_BadArgument("encode", 2, "str or None", args[1]);
+ _PyArg_BadArgument("encode", "argument 'errors'", "str or None", args[1]);
goto exit;
}
skip_optional_pos:
@@ -103,7 +103,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *cons
goto exit;
}
if (!PyBuffer_IsContiguous(&input, 'C')) {
- _PyArg_BadArgument("decode", 1, "contiguous buffer", args[0]);
+ _PyArg_BadArgument("decode", "argument 'input'", "contiguous buffer", args[0]);
goto exit;
}
if (!noptargs) {
@@ -124,7 +124,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *cons
}
}
else {
- _PyArg_BadArgument("decode", 2, "str or None", args[1]);
+ _PyArg_BadArgument("decode", "argument 'errors'", "str or None", args[1]);
goto exit;
}
skip_optional_pos:
@@ -223,7 +223,7 @@ _multibytecodec_MultibyteIncrementalEncoder_setstate(MultibyteIncrementalEncoder
PyLongObject *statelong;
if (!PyLong_Check(arg)) {
- _PyArg_BadArgument("setstate", 0, "int", arg);
+ _PyArg_BadArgument("setstate", "argument", "int", arg);
goto exit;
}
statelong = (PyLongObject *)arg;
@@ -282,7 +282,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb
goto exit;
}
if (!PyBuffer_IsContiguous(&input, 'C')) {
- _PyArg_BadArgument("decode", 1, "contiguous buffer", args[0]);
+ _PyArg_BadArgument("decode", "argument 'input'", "contiguous buffer", args[0]);
goto exit;
}
if (!noptargs) {
@@ -345,7 +345,7 @@ _multibytecodec_MultibyteIncrementalDecoder_setstate(MultibyteIncrementalDecoder
PyObject *state;
if (!PyTuple_Check(arg)) {
- _PyArg_BadArgument("setstate", 0, "tuple", arg);
+ _PyArg_BadArgument("setstate", "argument", "tuple", arg);
goto exit;
}
state = arg;
@@ -525,4 +525,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
-/*[clinic end generated code: output=eb95a408c4ddbfff input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5ce6fd4ca1f95620 input=a9049054013a1b77]*/