[pypy-commit] pypy py3.6: Match CPython error message

amauryfa pypy.commits at gmail.com
Thu Jan 4 03:17:25 EST 2018


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.6
Changeset: r93624:cd17bd421135
Date: 2018-01-04 00:06 +0100
http://bitbucket.org/pypy/pypy/changeset/cd17bd421135/

Log:	Match CPython error message

diff --git a/pypy/module/_io/interp_io.py b/pypy/module/_io/interp_io.py
--- a/pypy/module/_io/interp_io.py
+++ b/pypy/module/_io/interp_io.py
@@ -78,9 +78,9 @@
     if text and binary:
         raise oefmt(space.w_ValueError,
                     "can't have text and binary mode at once")
-    if reading + writing + creating + appending > 1:
+    if creating + reading + writing + appending > 1:
         raise oefmt(space.w_ValueError,
-                    "must have exactly one of read/write/create/append mode")
+                    "must have exactly one of create/read/write/append mode")
     if binary and encoding is not None:
         raise oefmt(space.w_ValueError,
                     "binary mode doesn't take an encoding argument")


More information about the pypy-commit mailing list