Make strip behave as documented. Will backport to 2.2.3.

This commit is contained in:
Martin v. Löwis 2002-11-08 12:09:59 +00:00
parent 1644986758
commit 1f04610b49
1 changed files with 2 additions and 2 deletions

View 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):