From: Martin v. Löwis Date: Fri, 8 Nov 2002 12:09:59 +0000 (+0000) Subject: Make strip behave as documented. Will backport to 2.2.3. X-Git-Tag: v2.3c1~3519 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f04610b497c733189212386152219040e18dacb;p=python Make strip behave as documented. Will backport to 2.2.3. --- 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):