mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Marc-Andre Lemburg:
The maxsplit functionality in .splitlines() was replaced by the keepends functionality which allows keeping the line end markers together with the string.
This commit is contained in:
parent
3afba7644b
commit
86662914be
2 changed files with 14 additions and 14 deletions
|
@ -96,7 +96,7 @@ class UserString:
|
|||
def rstrip(self): return self.__class__(self.data.rstrip())
|
||||
def split(self, sep=None, maxsplit=-1):
|
||||
return self.data.split(sep, maxsplit)
|
||||
def splitlines(self, maxsplit=-1): return self.data.splitlines(maxsplit)
|
||||
def splitlines(self, keepends=0): return self.data.splitlines(keepends)
|
||||
def startswith(self, prefix, start=0, end=sys.maxint):
|
||||
return self.data.startswith(prefix, start, end)
|
||||
def strip(self): return self.__class__(self.data.strip())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue