A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2020-June/166233.html below:

[Python-checkins] bpo-40876: Clarify error message in the csv module (GH-20653)

[Python-checkins] bpo-40876: Clarify error message in the csv module (GH-20653) [Python-checkins] bpo-40876: Clarify error message in the csv module (GH-20653)Ram Rachum webhook-mailer at python.org
Fri Jun 5 16:56:14 EDT 2020
https://github.com/python/cpython/commit/235f918f44bb89e27190db2f1823d191dbd4ad28
commit: 235f918f44bb89e27190db2f1823d191dbd4ad28
branch: master
author: Ram Rachum <ram at rachum.com>
committer: GitHub <noreply at github.com>
date: 2020-06-05T17:56:06-03:00
summary:

bpo-40876: Clarify error message in the csv module (GH-20653)

files:
A Misc/NEWS.d/next/Library/2020-06-05-20-00-18.bpo-40876.zDhiZj.rst
M 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
index 0000000000000..75f62addbabbc
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-06-05-20-00-18.bpo-40876.zDhiZj.rst
@@ -0,0 +1 @@
+Clarify error message in the :mod:`csv` module.
diff --git a/Modules/_csv.c b/Modules/_csv.c
index f33733aaf850d..7e44419c0876b 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -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);

More information about the Python-checkins mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4