Kaydet (Commit) eef65908 authored tarafından Jeremy Hylton's avatar Jeremy Hylton

Add getChildNodes() method to Node

üst 34aeeffb
......@@ -171,6 +171,8 @@ class Node:
return flatten(self._getChildren())
def asList(self):
return tuple(asList(self.getChildren()))
def getChildNodes(self):
return [n for n in self.getChildnre() if isinstance(n, Node)]
class EmptyNode(Node):
def __init__(self):
......
......@@ -171,6 +171,8 @@ class Node:
return flatten(self._getChildren())
def asList(self):
return tuple(asList(self.getChildren()))
def getChildNodes(self):
return [n for n in self.getChildnre() if isinstance(n, Node)]
class EmptyNode(Node):
def __init__(self):
......
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