summaryrefslogtreecommitdiff
path: root/Lib/string.py
diff options
context:
space:
mode:
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 489777b10c..261789cc10 100644
--- a/Lib/string.py
+++ b/Lib/string.py
@@ -45,7 +45,7 @@ def capwords(s, sep=None):
sep is used to split and join the words.
"""
- return (sep or ' ').join(x.capitalize() for x in s.split(sep))
+ return (sep or ' ').join(map(str.capitalize, s.split(sep)))
####################################################################