Commits

Matthew Schinckel  committed e89d985

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

  • Participants
  • Parent commits 4fac0f7

Comments (0)

Files changed (1)

File 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):
     """