diff --git a/fsspec/spec.py b/fsspec/spec.py index 7daf850e7..b0b1ee509 100644 --- a/fsspec/spec.py +++ b/fsspec/spec.py @@ -2131,7 +2131,7 @@ def readuntil(self, char=b"\n", blocks=None): return b"".join(out) def readline(self): - """Read until first occurrence of newline character + """Read until and including the first occurrence of newline character Note that, because of character encoding, this is not necessarily a true line ending. @@ -2148,7 +2148,7 @@ def __iter__(self): return self def readlines(self): - """Return all data, split by the newline character""" + """Return all data, split by the newline character, including the newline character""" data = self.read() lines = data.split(b"\n") out = [l + b"\n" for l in lines[:-1]]