Mercurial > cpython-lru_cache-weakref
diff Lib/string.py @ 26107:ef3f6929fc0e legacy-trunk
Make strip behave as documented. Will backport to 2.2.3.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Fri, 08 Nov 2002 12:09:59 +0000 |
| parents | af20aeaaa982 |
| children | a5d1e0814061 |
line wrap: on
line diff
--- a/Lib/string.py Fri Nov 08 05:49:47 2002 +0000 +++ b/Lib/string.py Fri Nov 08 12:09:59 2002 +0000 @@ -74,14 +74,14 @@ 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):
