From 28928aef2ed23ae038ba2dd12b7adc51fa62805f Mon Sep 17 00:00:00 2001
From: Georg Brandl <georg@python.org>
Date: Thu, 21 Oct 2010 13:45:52 +0000
Subject: [PATCH] #4829: better error message for invalid file mode

---
 Modules/_io/fileio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index ff278cfb1a..74009e3657 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -267,7 +267,8 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
             if (rwa) {
             bad_mode:
                 PyErr_SetString(PyExc_ValueError,
-                                "Must have exactly one of read/write/append mode");
+                                "Must have exactly one of read/write/append "
+                                "mode and at most one plus");
                 goto error;
             }
             rwa = 1;
-- 
2.40.0