mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Use correct separator for capwords(s, sep).
This commit is contained in:
parent
9e3f42909a
commit
f480c674b1
2 changed files with 2 additions and 2 deletions
|
@ -288,7 +288,7 @@ def capitalize(s):
|
||||||
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
|
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
|
||||||
# See also regsub.capwords().
|
# See also regsub.capwords().
|
||||||
def capwords(s, sep=None):
|
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
|
# Construct a translation string
|
||||||
_idmapL = None
|
_idmapL = None
|
||||||
|
|
|
@ -288,7 +288,7 @@ def capitalize(s):
|
||||||
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
|
# Capitalize the words in a string, e.g. " aBc dEf " -> "Abc Def".
|
||||||
# See also regsub.capwords().
|
# See also regsub.capwords().
|
||||||
def capwords(s, sep=None):
|
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
|
# Construct a translation string
|
||||||
_idmapL = None
|
_idmapL = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue