diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2015-12-21 14:17:12 -0600 |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2015-12-21 14:17:12 -0600 |
commit | f2b234443c53cb73dc749da57d952286437cb15a (patch) | |
tree | f21b8b25f5bfbe76a2c85ae62f6d06060dd03372 /Lib/_pyio.py | |
parent | 26b842a82d9ae7d30c692080bf352a0ef78a626c (diff) | |
parent | 977fd6d7c6593680fd5ffdebb262a2a3f2f24387 (diff) | |
download | cpython-f2b234443c53cb73dc749da57d952286437cb15a.tar.gz |
Issue #25827: Merge with 3.5
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r-- | Lib/_pyio.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 37157d53ab..c3ad81e6db 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -182,8 +182,8 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None, text = "t" in modes binary = "b" in modes if "U" in modes: - if creating or writing or appending: - raise ValueError("can't use U and writing mode at once") + if creating or writing or appending or updating: + raise ValueError("mode U cannot be combined with 'x', 'w', 'a', or '+'") import warnings warnings.warn("'U' mode is deprecated", DeprecationWarning, 2) |