mirror of https://github.com/python/cpython.git
Make strip behave as documented. Will backport to 2.2.3.
This commit is contained in:
parent
1644986758
commit
1f04610b49
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue