From: Martin v. Löwis Date: Fri, 8 Nov 2002 12:11:03 +0000 (+0000) Subject: Make strip work as documented. X-Git-Tag: v2.2.3c1~242 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d86997d24876e1210a3217addcf91434bbd59c2d;p=thirdparty%2FPython%2Fcpython.git Make strip work as documented. --- diff --git a/Lib/string.py b/Lib/string.py index cd9909e26617..c87ffb4783f3 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -73,14 +73,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):