diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-11-08 12:09:59 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-11-08 12:09:59 +0000 |
commit | e8a7706cc687c81d3df212e068b5dd9889baab0c (patch) | |
tree | 65388eed2959a0a371a8b2674ca9e85a1399c153 /Lib/string.py | |
parent | 61932a101f379686921a8dcd9bd15fd68310d547 (diff) | |
download | cpython-e8a7706cc687c81d3df212e068b5dd9889baab0c.tar.gz |
Make strip behave as documented. Will backport to 2.2.3.
Diffstat (limited to 'Lib/string.py')
-rw-r--r-- | Lib/string.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/string.py b/Lib/string.py index ec796f63ad..64e1190496 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -74,14 +74,14 @@ def swapcase(s): return s.swapcase() # Strip leading and trailing tabs and spaces -def strip(s): +def strip(s, chars=None): """strip(s) -> string Return a copy of the string s with leading and trailing whitespace removed. """ - return s.strip() + return s.strip(chars) # Strip leading tabs and spaces def lstrip(s): |