Skip to content

Commit 30af5e1

Browse files
authored
Add newline inclusive disclaimer (#1770)
1 parent 1d34249 commit 30af5e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fsspec/spec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,7 @@ def readuntil(self, char=b"\n", blocks=None):
21312131
return b"".join(out)
21322132

21332133
def readline(self):
2134-
"""Read until first occurrence of newline character
2134+
"""Read until and including the first occurrence of newline character
21352135
21362136
Note that, because of character encoding, this is not necessarily a
21372137
true line ending.
@@ -2148,7 +2148,7 @@ def __iter__(self):
21482148
return self
21492149

21502150
def readlines(self):
2151-
"""Return all data, split by the newline character"""
2151+
"""Return all data, split by the newline character, including the newline character"""
21522152
data = self.read()
21532153
lines = data.split(b"\n")
21542154
out = [l + b"\n" for l in lines[:-1]]

0 commit comments

Comments
 (0)