Kaydet (Commit) 0ee43518 authored tarafından Alex Martelli's avatar Alex Martelli

Changed minidom.py to work correctly with new-style classes (since

there are no other kinds of classes in Py3K).
üst 00ee7baf
...@@ -359,6 +359,8 @@ class Attr(Node): ...@@ -359,6 +359,8 @@ class Attr(Node):
# nodeValue and value are set elsewhere # nodeValue and value are set elsewhere
def _get_localName(self): def _get_localName(self):
if 'localName' in self.__dict__:
return self.__dict__['localName']
return self.nodeName.split(":", 1)[-1] return self.nodeName.split(":", 1)[-1]
def _get_name(self): def _get_name(self):
...@@ -662,6 +664,8 @@ class Element(Node): ...@@ -662,6 +664,8 @@ class Element(Node):
# namespaces. # namespaces.
def _get_localName(self): def _get_localName(self):
if 'localName' in self.__dict__:
return self.__dict__['localName']
return self.tagName.split(":", 1)[-1] return self.tagName.split(":", 1)[-1]
def _get_tagName(self): def _get_tagName(self):
...@@ -1118,7 +1122,7 @@ def _get_containing_entref(node): ...@@ -1118,7 +1122,7 @@ def _get_containing_entref(node):
return None return None
class Comment(Childless, CharacterData): class Comment(CharacterData):
nodeType = Node.COMMENT_NODE nodeType = Node.COMMENT_NODE
nodeName = "#comment" nodeName = "#comment"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment