diff options
author | Guido van Rossum <guido@python.org> | 2000-04-11 15:38:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-04-11 15:38:46 (GMT) |
commit | 86662914be20e1f008132647a82cdeb9506f13c5 (patch) | |
tree | 3e4d9998f3fbf1b027eb38014388d479997c250f /Lib | |
parent | 3afba7644b481eb7ef6baf02fad42a185b0f008e (diff) | |
download | cpython-86662914be20e1f008132647a82cdeb9506f13c5.zip cpython-86662914be20e1f008132647a82cdeb9506f13c5.tar.gz cpython-86662914be20e1f008132647a82cdeb9506f13c5.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/UserString.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py index c2c2bed..528065e 100755 --- a/Lib/UserString.py +++ b/Lib/UserString.py @@ -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()) |