diff --git a/Lib/string.py b/Lib/string.py
index fd8363b0ec7461416490fada1787453a5838dfaa..687518d30e398e50a80fdd4e05cfd0512f499c16 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 fd8363b0ec7461416490fada1787453a5838dfaa..687518d30e398e50a80fdd4e05cfd0512f499c16 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