summaryrefslogtreecommitdiffstats
path: root/Lib
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
parent9e3f42909accd3e2f0dfb209323aa649f00d048f (diff)
downloadcpython-f480c674b1462db277f997dcdc120006a79cdcb2.zip
cpython-f480c674b1462db277f997dcdc120006a79cdcb2.tar.gz
cpython-f480c674b1462db277f997dcdc120006a79cdcb2.tar.bz2
Use correct separator for capwords(s, sep).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/string.py2
-rw-r--r--Lib/stringold.py2
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