summaryrefslogtreecommitdiffstats
path: root/Lib/regsub.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/regsub.py')
-rw-r--r--Lib/regsub.py5
1 files changed, 2 insertions, 3 deletions
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 @@ def intsplit(str, pat, maxsplit, retain):
# 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: