Commits

Matthew Schinckel committed e89d985

Don't create string by concatenating, use [].join

Comments (0)

Files changed (1)

timedelta/helpers.py

-
 import re
 import datetime
 from decimal import Decimal
         )),
       )
 
-    result = ''
+    result = []
     for category, subcats in formatting:
         result += category
         for format, value in subcats:
             if value:
-                result += '%d%c' % (value, format)
+                result.append('%d%c' % (value, format))
 
-    return result
+    return result.join("")
 
 def parse(string):
     """