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

This commit is contained in:
Ram Rachum 2020-06-05 23:56:06 +03:00 committed by GitHub
parent 161541ab45
commit 235f918f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Clarify error message in the :mod:`csv` module.

View 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);