From 34f71934dacede93f59b372fde4c5a646dbc702b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 7 Feb 2010 16:37:14 -0500 Subject: 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. --- coverage/templite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/templite.py') 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" -- cgit v1.2.1