commit | 66d9919cab903e152d206b7edb853799eca564d0 | [log] [tgz] |
---|---|---|
author | Eric S. Raymond <esr@thyrsus.com> | Fri Feb 09 09:19:27 2001 +0000 |
committer | Eric S. Raymond <esr@thyrsus.com> | Fri Feb 09 09:19:27 2001 +0000 |
tree | 02904c744034f367e8be10dc15c8ea7007d8f1d4 | |
parent | ee5e61d3bc127c9d3c6ac752b2d381718da910ef [diff] [blame] |
String method conversion.
diff --git a/Lib/regsub.py b/Lib/regsub.py index 4a36512..7778602 100644 --- a/Lib/regsub.py +++ b/Lib/regsub.py
@@ -107,11 +107,10 @@ # Capitalize words split using a pattern def capwords(str, pat='[^a-zA-Z0-9_]+'): - import string words = splitx(str, pat) for i in range(0, len(words), 2): - words[i] = string.capitalize(words[i]) - return string.joinfields(words, "") + words[i] = words[i].capitalize() + return "".joinfields(words) # Internal subroutines: