summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Martelli <aleaxit@gmail.com>2006-08-21 19:53:20 (GMT)
committerAlex Martelli <aleaxit@gmail.com>2006-08-21 19:53:20 (GMT)
commit0ee4351893090b84ee85131f623505e2ff826128 (patch)
tree34b52f22d2741145284baa0fe4bf845d81c6ecec
parent00ee7baf49430d8a6eed355a5fd7a05179325747 (diff)
downloadcpython-0ee4351893090b84ee85131f623505e2ff826128.zip
cpython-0ee4351893090b84ee85131f623505e2ff826128.tar.gz
cpython-0ee4351893090b84ee85131f623505e2ff826128.tar.bz2
Changed minidom.py to work correctly with new-style classes (since
there are no other kinds of classes in Py3K).
-rw-r--r--Lib/xml/dom/minidom.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 1a3b74f..028e809 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -359,6 +359,8 @@ class Attr(Node):
# nodeValue and value are set elsewhere
def _get_localName(self):
+ if 'localName' in self.__dict__:
+ return self.__dict__['localName']
return self.nodeName.split(":", 1)[-1]
def _get_name(self):
@@ -662,6 +664,8 @@ class Element(Node):
# namespaces.
def _get_localName(self):
+ if 'localName' in self.__dict__:
+ return self.__dict__['localName']
return self.tagName.split(":", 1)[-1]
def _get_tagName(self):
@@ -1118,7 +1122,7 @@ def _get_containing_entref(node):
return None
-class Comment(Childless, CharacterData):
+class Comment(CharacterData):
nodeType = Node.COMMENT_NODE
nodeName = "#comment"