[Lxml-checkins] r49950 - in lxml/trunk: . benchmark

scoder at codespeak.net scoder at codespeak.net
Thu Dec 20 11:35:11 CET 2007


Author: scoder
Date: Thu Dec 20 11:35:10 2007
New Revision: 49950

Modified:
   lxml/trunk/   (props changed)
   lxml/trunk/benchmark/bench_etree.py
Log:
 r3151 at delle:  sbehnel | 2007-12-20 11:34:50 +0100
 API usage fix


Modified: lxml/trunk/benchmark/bench_etree.py
==============================================================================
--- lxml/trunk/benchmark/bench_etree.py	(original)
+++ lxml/trunk/benchmark/bench_etree.py	Thu Dec 20 11:35:10 2007
@@ -37,24 +37,24 @@
     @with_attributes(True, False)
     @with_text(text=True, utext=True)
     def bench_tostring_utf8(self, root):
-        self.etree.tostring(root, 'UTF-8')
+        self.etree.tostring(root, encoding='UTF-8')
 
     @with_attributes(True, False)
     @with_text(text=True, utext=True)
     def bench_tostring_utf16(self, root):
-        self.etree.tostring(root, 'UTF-16')
+        self.etree.tostring(root, encoding='UTF-16')
 
     @with_attributes(True, False)
     @with_text(text=True, utext=True)
     def bench_tostring_utf8_unicode_XML(self, root):
-        xml = unicode(self.etree.tostring(root, 'UTF-8'), 'UTF-8')
+        xml = unicode(self.etree.tostring(root, encoding='UTF-8'), 'UTF-8')
         self.etree.XML(xml)
 
     @with_attributes(True, False)
     @with_text(text=True, utext=True)
     def bench_write_utf8_parse_stringIO(self, root):
         f = StringIO()
-        self.etree.ElementTree(root).write(f, 'UTF-8')
+        self.etree.ElementTree(root).write(f, encoding='UTF-8')
         f.seek(0)
         self.etree.parse(f)
 


More information about the lxml-checkins mailing list