From 235f918f44bb89e27190db2f1823d191dbd4ad28 Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Fri, 5 Jun 2020 23:56:06 +0300 Subject: bpo-40876: Clarify error message in the csv module (GH-20653) --- Misc/NEWS.d/next/Library/2020-06-05-20-00-18.bpo-40876.zDhiZj.rst | 1 + Modules/_csv.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2020-06-05-20-00-18.bpo-40876.zDhiZj.rst 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 0000000..75f62ad --- /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 f33733a..7e44419 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); -- cgit v0.12