Mercurial > cpython-lru_cache-weakref
diff Lib/UserString.py @ 12369:68e48bb94071 legacy-trunk
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.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 11 Apr 2000 15:38:46 +0000 |
| parents | a216fe79ae00 |
| children | e44ca61db715 |
line wrap: on
line diff
--- a/Lib/UserString.py Tue Apr 11 15:38:23 2000 +0000 +++ b/Lib/UserString.py Tue Apr 11 15:38:46 2000 +0000 @@ -96,7 +96,7 @@ 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())
