summaryrefslogtreecommitdiffstats
path: root/Modules/_io/clinic/textio.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-08-29 15:29:59 (GMT)
committerGitHub <noreply@github.com>2019-08-29 15:29:59 (GMT)
commit96631dcb11c2786f470d4586bf23ecca14361506 (patch)
treec9e4d813d843a2ec84983bf9bf3f301d6f2036bc /Modules/_io/clinic/textio.c.h
parent9db66a2b5ab6a302bc46421712f13b0afd94654b (diff)
downloadcpython-96631dcb11c2786f470d4586bf23ecca14361506.zip
cpython-96631dcb11c2786f470d4586bf23ecca14361506.tar.gz
cpython-96631dcb11c2786f470d4586bf23ecca14361506.tar.bz2
[3.8] bpo-37034: Display argument name on errors with keyword arguments with Argument Clinic. (GH-13593). (GH-15599)
(cherry picked from commit 4901fe274bc82b95dc89bcb3de8802a3dfedab32) Co-authored-by: RĂ©mi Lapeyre <remi.lapeyre@henki.fr>
Diffstat (limited to 'Modules/_io/clinic/textio.c.h')
-rw-r--r--Modules/_io/clinic/textio.c.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h
index cec9def..b8b5075 100644
--- a/Modules/_io/clinic/textio.c.h
+++ b/Modules/_io/clinic/textio.c.h
@@ -229,7 +229,7 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs)
}
}
else {
- _PyArg_BadArgument("TextIOWrapper", 2, "str or None", fastargs[1]);
+ _PyArg_BadArgument("TextIOWrapper", "argument 'encoding'", "str or None", fastargs[1]);
goto exit;
}
if (!--noptargs) {
@@ -258,7 +258,7 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs)
}
}
else {
- _PyArg_BadArgument("TextIOWrapper", 4, "str or None", fastargs[3]);
+ _PyArg_BadArgument("TextIOWrapper", "argument 'newline'", "str or None", fastargs[3]);
goto exit;
}
if (!--noptargs) {
@@ -401,7 +401,7 @@ _io_TextIOWrapper_write(textio *self, PyObject *arg)
PyObject *text;
if (!PyUnicode_Check(arg)) {
- _PyArg_BadArgument("write", 0, "str", arg);
+ _PyArg_BadArgument("write", "argument", "str", arg);
goto exit;
}
if (PyUnicode_READY(arg) == -1) {
@@ -701,4 +701,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
{
return _io_TextIOWrapper_close_impl(self);
}
-/*[clinic end generated code: output=b651e056e3000f88 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b1bae4f4cdf6019e input=a9049054013a1b77]*/