Permalink
Browse files

String formatting optimizations.

  • Loading branch information...
1 parent 916a65b commit 8470c049ff669355cfc87707fbadc0c455286b3d @BertrandBordage committed Sep 12, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 terms/html.py
View
@@ -24,28 +24,28 @@ def feed(self, data):
self.out = ''.join(self.out)
def handle_startendtag(self, tag, attrs):
- self.out__append('<%s%s />' % (tag, concat_attrs(attrs)))
+ self.out__append('<' + tag + concat_attrs(attrs) + ' />')
def handle_starttag(self, tag, attrs):
- self.out__append('<%s%s>' % (tag, concat_attrs(attrs)))
+ self.out__append('<' + tag + concat_attrs(attrs) + '>')
def handle_endtag(self, tag):
- self.out__append('</%s>' % tag)
+ self.out__append('</' + tag + '>')
def handle_data(self, data):
self.out__append(data)
def handle_comment(self, data):
- self.out__append('<!--%s-->' % data)
+ self.out__append('<!--' + data + '-->')
def handle_decl(self, decl):
- self.out__append('<!%s>' % decl)
+ self.out__append('<!' + decl + '>')
def handle_pi(self, data):
- self.out__append('<?%s>' % data)
+ self.out__append('<?' + data + '>')
def unknown_decl(self, decl):
- self.out__append('<![%s]>' % decl)
+ self.out__append('<![' + decl + ']>')
class TermsHTMLReconstructor(NeutralHTMLReconstructor):

0 comments on commit 8470c04

Please sign in to comment.