]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40876: Clarify error message in the csv module (GH-20653)
authorRam Rachum <ram@rachum.com>
Fri, 5 Jun 2020 20:56:06 +0000 (23:56 +0300)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2020 20:56:06 +0000 (17:56 -0300)
Misc/NEWS.d/next/Library/2020-06-05-20-00-18.bpo-40876.zDhiZj.rst [new file with mode: 0644]
Modules/_csv.c

diff --git a/Misc/NEWS.d/next/Library/2020-06-05-20-00-18.bpo-40876.zDhiZj.rst b/Misc/NEWS.d/next/Library/2020-06-05-20-00-18.bpo-40876.zDhiZj.rst
new file mode 100644 (file)
index 0000000..75f62ad
--- /dev/null
@@ -0,0 +1 @@
+Clarify error message in the :mod:`csv` module.
index f33733aaf850d16bca82b03ffb8ec97385fbcea5..7e44419c0876ba7bf549bf47e6cf2ae8baf558ad 100644 (file)
@@ -810,7 +810,7 @@ Reader_iternext(ReaderObj *self)
             PyErr_Format(_csvstate_global->error_obj,
                          "iterator should return strings, "
                          "not %.200s "
-                         "(did you open the file in text mode?)",
+                         "(the file should be opened in text mode)",
                          Py_TYPE(lineobj)->tp_name
                 );
             Py_DECREF(lineobj);