diff emeraldtree/ElementTree.py @ 21:7b33b90de8be

some minor coding style cleanups
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 03 Jun 2008 20:40:02 +0200
parents 56cb25aba1e6
children 0aa00b020bc1
line wrap: on
line diff
--- a/emeraldtree/ElementTree.py	Sat May 31 21:50:36 2008 +0200
+++ b/emeraldtree/ElementTree.py	Tue Jun 03 20:40:02 2008 +0200
@@ -1224,7 +1224,7 @@
 
     def close(self):
         assert len(self._elem) == 0, "missing end tags"
-        assert self._last != None, "missing toplevel element"
+        assert self._last is not None, "missing toplevel element"
         return self._last
 
     def _flush(self):
@@ -1293,7 +1293,8 @@
             from xml.parsers import expat
         except ImportError:
             try:
-                import pyexpat; expat = pyexpat
+                import pyexpat
+                expat = pyexpat
             except ImportError:
                 raise ImportError(
                     "No module named expat; use SimpleXMLTreeBuilder instead"