Index: Lib/xml/etree/ElementPath.py =================================================================== --- Lib/xml/etree/ElementPath.py (Revision 65108) +++ Lib/xml/etree/ElementPath.py (Arbeitskopie) @@ -52,6 +52,7 @@ ## import re +import types xpath_tokenizer = re.compile( "(::|\.\.|\(\)|[/.*:\[\]\(\)@=])|((?:\{[^}]+\})?[^/:\[\]\(\)@=\s]+)|\s+" @@ -94,7 +95,7 @@ ) if self.path and isinstance(self.path[-1], xpath_descendant_or_self): raise SyntaxError("path cannot end with //") - if len(self.path) == 1 and isinstance(self.path[0], type("")): + if len(self.path) == 1 and isinstance(self.path[0], types.StringTypes): self.tag = self.path[0] ## @@ -143,7 +144,7 @@ if isinstance(path, xpath_descendant_or_self): try: tag = self.path[index] - if not isinstance(tag, type("")): + if not isinstance(tag, types.StringTypes): tag = None else: index = index + 1