diff options
author | Guido van Rossum <guido@python.org> | 1996-08-26 15:55:00 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-26 15:55:00 (GMT) |
commit | f480c674b1462db277f997dcdc120006a79cdcb2 (patch) | |
tree | ce1b100aa9f3c8abc833e6b66a744a00ddfc05eb | |
parent | 9e3f42909accd3e2f0dfb209323aa649f00d048f (diff) | |
download | cpython-f480c674b1462db277f997dcdc120006a79cdcb2.zip cpython-f480c674b1462db277f997dcdc120006a79cdcb2.tar.gz cpython-f480c674b1462db277f997dcdc120006a79cdcb2.tar.bz2 |
Use correct separator for capwords(s, sep).
-rw-r--r-- | Lib/string.py | 2 | ||||
-rw-r--r-- | Lib/stringold.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/string.py b/Lib/string.py index fd8363b..687518d 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -288,7 +288,7 @@ def capitalize(s): # Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def". # See also regsub.capwords(). def capwords(s, sep=None): - return join(map(capitalize, split(s, sep))) + return join(map(capitalize, split(s, sep)), sep or ' ') # Construct a translation string _idmapL = None diff --git a/Lib/stringold.py b/Lib/stringold.py index fd8363b..687518d 100644 --- a/Lib/stringold.py +++ b/Lib/stringold.py @@ -288,7 +288,7 @@ def capitalize(s): # Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def". # See also regsub.capwords(). def capwords(s, sep=None): - return join(map(capitalize, split(s, sep))) + return join(map(capitalize, split(s, sep)), sep or ' ') # Construct a translation string _idmapL = None |