mirror of
https://github.com/python/cpython
synced 2024-10-14 09:31:57 +00:00
Changed minidom.py to work correctly with new-style classes (since
there are no other kinds of classes in Py3K).
This commit is contained in:
parent
00ee7baf49
commit
0ee4351893
|
@ -359,6 +359,8 @@ def __init__(self, qName, namespaceURI=EMPTY_NAMESPACE, localName=None,
|
|||
# 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 @@ def __init__(self, tagName, namespaceURI=EMPTY_NAMESPACE, prefix=None,
|
|||
# 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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue