Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28928ae

Browse files
committed
#4829: better error message for invalid file mode
1 parent 9583cac commit 28928ae

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_io/fileio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
267267
if (rwa) {
268268
bad_mode:
269269
PyErr_SetString(PyExc_ValueError,
270-
"Must have exactly one of read/write/append mode");
270+
"Must have exactly one of read/write/append "
271+
"mode and at most one plus");
271272
goto error;
272273
}
273274
rwa = 1;

0 commit comments

Comments
 (0)