summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 73f87b9..9bce532 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -950,12 +950,12 @@ class _PathBase(PurePath):
with self.open(mode='rb') as f:
return f.read()
- def read_text(self, encoding=None, errors=None):
+ def read_text(self, encoding=None, errors=None, newline=None):
"""
Open the file in text mode, read it, and close the file.
"""
encoding = io.text_encoding(encoding)
- with self.open(mode='r', encoding=encoding, errors=errors) as f:
+ with self.open(mode='r', encoding=encoding, errors=errors, newline=newline) as f:
return f.read()
def write_bytes(self, data):