diff options
| author | Guido van Rossum <guido@python.org> | 1996-08-20 20:25:41 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1996-08-20 20:25:41 +0000 |
| commit | fdfacbc3a67e8b8d9e9cbc2d117c8fe98c536886 (patch) | |
| tree | faef39d0cffd81b08b9536680b9ca4699b832ddf /Lib/stringold.py | |
| parent | dd427c6d9c1d5e30ecdd9b0044a46dc8a8f2c133 (diff) | |
| download | cpython-fdfacbc3a67e8b8d9e9cbc2d117c8fe98c536886.tar.gz | |
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 1953bfc38f..fd8363b0ec 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 |
