diff options
author | speedrun-program <71526906+speedrun-program@users.noreply.github.com> | 2021-09-16 19:49:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-16 19:49:38 (GMT) |
commit | a59ede244714455aa9ee8637608e019a20fa2ca6 (patch) | |
tree | 4fa0f743ec7e6e0c9d140002e28d0ca9d209c7cb /Lib | |
parent | f4b94b1f57827083990272b5f282aa1493ae2bf4 (diff) | |
download | cpython-a59ede244714455aa9ee8637608e019a20fa2ca6.zip cpython-a59ede244714455aa9ee8637608e019a20fa2ca6.tar.gz cpython-a59ede244714455aa9ee8637608e019a20fa2ca6.tar.bz2 |
bpo-45225: use map function instead of genexpr in capwords (GH-28342)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/string.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/string.py b/Lib/string.py index 489777b..261789c 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))) #################################################################### |