Skip to content

Commit 4d554cd

Browse files
committed
Add missing decorater; property
65e2872
1 parent cb87f92 commit 4d554cd

File tree

1 file changed

+2
-0
lines changed
  • w3/python/core/fundamental_interface

1 file changed

+2
-0
lines changed

w3/python/core/fundamental_interface/Node.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,15 @@ def _init_child_nodes(self,
175175
else:
176176
self._child_nodes = NodeList(iter(child_nodes))
177177

178+
@property
178179
def first_child(self) -> Optional[_AnyNode]:
179180
"""The first child of this node. If there is no such node, this returns `None`.
180181
"""
181182
if not self.child_nodes:
182183
return None
183184
return self.child_nodes.item(0)
184185

186+
@property
185187
def last_child(self) -> Optional[_AnyNode]:
186188
"""The last child of this node. If there is no such node, this returns `None`.
187189
"""

0 commit comments

Comments
 (0)