Skip to content

Commit

Permalink
Add newline inclusive disclaimer (#1770)
Browse files Browse the repository at this point in the history
  • Loading branch information
diederikvdv authored Jan 10, 2025
1 parent 1d34249 commit 30af5e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fsspec/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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]]
Expand Down

0 comments on commit 30af5e1

Please sign in to comment.