diff options
author | Guido van Rossum <guido@python.org> | 1996-08-20 20:25:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-20 20:25:41 (GMT) |
commit | 34f173110fbe9f765c43f38b5a5731b5539eb295 (patch) | |
tree | 30f19618c3dd2bc89c3e881e67b40dfd6841ae33 /Lib/stringold.py | |
parent | 63f0cf084077bdfe165a899175deca24a0f783e5 (diff) | |
download | cpython-34f173110fbe9f765c43f38b5a5731b5539eb295.zip cpython-34f173110fbe9f765c43f38b5a5731b5539eb295.tar.gz cpython-34f173110fbe9f765c43f38b5a5731b5539eb295.tar.bz2 |
Add optional separator character to capwords(), for completeness.
Diffstat (limited to 'Lib/stringold.py')
-rw-r--r-- | Lib/stringold.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/stringold.py b/Lib/stringold.py index 1953bfc..fd8363b 100644 --- a/Lib/stringold.py +++ b/Lib/stringold.py @@ -287,8 +287,8 @@ def capitalize(s): # Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def". # See also regsub.capwords(). -def capwords(s): - return join(map(capitalize, split(s))) +def capwords(s, sep=None): + return join(map(capitalize, split(s, sep))) # Construct a translation string _idmapL = None |