mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Make strip behave as documented. Will backport to 2.2.3.
This commit is contained in:
parent
1644986758
commit
1f04610b49
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue