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:
Guido van Rossum 2000-04-11 15:38:46 +00:00
parent 3afba7644b
commit 86662914be
2 changed files with 14 additions and 14 deletions

View file

@ -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())