Replace sequential split/join calls on strings with a single replace call.
Thanks Andrew Gaul.
diff --git a/Lib/locale.py b/Lib/locale.py
index 2028948..192c91f 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -159,18 +159,16 @@
     """Convert float to integer, taking the locale into account."""
     return format("%.12g",val)
 
-def atof(str,func=float):
+def atof(string,func=float):
     "Parses a string as a float according to the locale settings."
     #First, get rid of the grouping
     ts = localeconv()['thousands_sep']
     if ts:
-        s=str.split(ts)
-        str="".join(s)
+        str = str.replace(ts, '')
     #next, replace the decimal point with a dot
     dd = localeconv()['decimal_point']
     if dd:
-        s=str.split(dd)
-        str='.'.join(s)
+        str = str.replace(dd, '.')
     #finally, parse the string
     return func(str)
 
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 1e633d8..8234296 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -169,9 +169,7 @@
             proxy = None
         name = 'open_' + urltype
         self.type = urltype
-        if '-' in name:
-            # replace - with _
-            name = '_'.join(name.split('-'))
+        name = name.replace('-', '_')
         if not hasattr(self, name):
             if proxy:
                 return self.open_unknown_proxy(proxy, fullurl, data)
@@ -1045,9 +1043,7 @@
 
 def unquote_plus(s):
     """unquote('%7e/abc+def') -> '~/abc def'"""
-    if '+' in s:
-        # replace '+' with ' '
-        s = ' '.join(s.split('+'))
+    s = s.replace('+', ' ')
     return unquote(s)
 
 always_safe = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ'