mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Revert "bpo-43510: PEP 597: Accept encoding="locale"
in binary mode (GH-25103)" (#25108)
This reverts commit ff3c9739bd
.
This commit is contained in:
parent
ff3c9739bd
commit
cfa176685a
3 changed files with 2 additions and 14 deletions
|
@ -221,7 +221,7 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None,
|
|||
raise ValueError("can't have read/write/append mode at once")
|
||||
if not (creating or reading or writing or appending):
|
||||
raise ValueError("must have exactly one of read/write/append mode")
|
||||
if binary and encoding is not None and encoding != "locale":
|
||||
if binary and encoding is not None:
|
||||
raise ValueError("binary mode doesn't take an encoding argument")
|
||||
if binary and errors is not None:
|
||||
raise ValueError("binary mode doesn't take an errors argument")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue