From fbe7b4fc8c48aa722ef4838182091d1aac75681d Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 4 Jul 2001 06:25:53 +0000 Subject: Make the implementations of getElementsByTagName() and getElementsByTagNameNS() consistent in form as well as functionality (cosmetic). --- Lib/xml/dom/minidom.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index 59f86a7..d440045 100644 --- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py @@ -551,9 +551,7 @@ class Element(Node): return _getElementsByTagNameHelper(self, name, []) def getElementsByTagNameNS(self, namespaceURI, localName): - rc = [] - _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc) - return rc + return _getElementsByTagNameNSHelper(self, namespaceURI, localName, []) def __repr__(self): return "" % (self.tagName, id(self)) @@ -881,15 +879,11 @@ class Document(Node): a.value = "" return a - def getElementsByTagNameNS(self, namespaceURI, localName): - rc = [] - _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc) - return rc - def getElementsByTagName(self, name): - rc = [] - _getElementsByTagNameHelper(self, name, rc) - return rc + return _getElementsByTagNameHelper(self, name, []) + + def getElementsByTagNameNS(self, namespaceURI, localName): + return _getElementsByTagNameNSHelper(self, namespaceURI, localName, []) def writexml(self, writer, indent="", addindent="", newl=""): writer.write('\n') -- cgit v0.12