summaryrefslogtreecommitdiffstats
path: root/Lib/string.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-26 15:55:00 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-26 15:55:00 (GMT)
commitf480c674b1462db277f997dcdc120006a79cdcb2 (patch)
treece1b100aa9f3c8abc833e6b66a744a00ddfc05eb /Lib/string.py
parent9e3f42909accd3e2f0dfb209323aa649f00d048f (diff)
downloadcpython-f480c674b1462db277f997dcdc120006a79cdcb2.zip
cpython-f480c674b1462db277f997dcdc120006a79cdcb2.tar.gz
cpython-f480c674b1462db277f997dcdc120006a79cdcb2.tar.bz2
Use correct separator for capwords(s, sep).
Diffstat (limited to 'Lib/string.py')
-rw-r--r--Lib/string.py2
1 files changed, 1 insertions, 1 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