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
commit36a637f828d6596d0e83b6aa324f4f5f023eb16b (patch)
treefd0da2956b13fec520312daadd74c68cb3c5a35f /coverage/templite.py
parenta53e424061f4765df93caeab8627da87968299d9 (diff)
downloadpython-coveragepy-git-36a637f828d6596d0e83b6aa324f4f5f023eb16b.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 66f38a9c..c39e061e 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"