Commits

Anonymous committed 951ed9a

Use correct separator for capwords(s, sep).

  • Participants
  • Parent commits efebf1c
  • Branches legacy-trunk

Comments (0)

Files changed (2)

File Lib/string.py

 # 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

File Lib/stringold.py

 # 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