summaryrefslogtreecommitdiff
path: root/coverage/templite.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2010-02-07 16:37:14 -0500
committerNed Batchelder <ned@nedbatchelder.com>2010-02-07 16:37:14 -0500
commit34f71934dacede93f59b372fde4c5a646dbc702b (patch)
tree3c4f0c1704659d0b6e66a973a55b7c37a4229fc8 /coverage/templite.py
parentb79c9052164851e90603be595eddcbda25f7aadc (diff)
downloadpython-coveragepy-34f71934dacede93f59b372fde4c5a646dbc702b.tar.gz
Clean up the lst += string stuff, whereby string being iterable means each char is added as an element of the list. Also, apply the 'join is better than append' rule to other places, where, alas, it doesn't seem to have the same magic effect.
Diffstat (limited to 'coverage/templite.py')
-rw-r--r--coverage/templite.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/templite.py b/coverage/templite.py
index 66f38a9..c39e061 100644
--- a/coverage/templite.py
+++ b/coverage/templite.py
@@ -118,10 +118,10 @@ class _TempliteEngine(object):
"""
for op, args in ops:
if op == 'lit':
- self.result += args
+ self.result.append(args)
elif op == 'exp':
try:
- self.result += str(self.evaluate(args))
+ self.result.append(str(self.evaluate(args)))
except:
exc_class, exc, _ = sys.exc_info()
new_exc = exc_class("Couldn't evaluate {{ %s }}: %s"