commit | 1f04610b497c733189212386152219040e18dacb | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Fri Nov 08 12:09:59 2002 +0000 |
committer | Martin v. Löwis <martin@v.loewis.de> | Fri Nov 08 12:09:59 2002 +0000 |
tree | 48258a497989fba86c31f622ad987ee362dcabd4 | |
parent | 1644986758e73a5e351d8938e8fd784824a327c7 [diff] [blame] |
Make strip behave as documented. Will backport to 2.2.3.
diff --git a/Lib/string.py b/Lib/string.py index ec796f6..64e1190 100644 --- a/Lib/string.py +++ b/Lib/string.py
@@ -74,14 +74,14 @@ 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):