]> granicus.if.org Git - python/commitdiff
Make strip behave as documented. Will backport to 2.2.3.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 8 Nov 2002 12:09:59 +0000 (12:09 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 8 Nov 2002 12:09:59 +0000 (12:09 +0000)
Lib/string.py

index ec796f63adb2a2899e2b6e3fa3640ecc9a143a30..64e1190496068265b7aa3d4bc5667137ed3fd452 100644 (file)
@@ -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):