MCPcopy Create free account
hub / github.com/ActiveState/code / __getLeftSibling

Method __getLeftSibling

recipes/Python/577898_23_Tree/recipe-577898.py:260–263  ·  view source on GitHub ↗

Returns left sibling of a node

(self, node)

Source from the content-addressed store, hash-verified

258 return self.__find(nextNode, a)
259
260 def __getLeftSibling(self, node):
261 """ Returns left sibling of a node """
262 if (node and node.parent) is not None:
263 return node.parent.getLink(node.parent.getLinkIdx(node) - 1)
264
265 def __getRightSibling(self, node):
266 """ Returns right sibling of a node """

Callers 2

__getSiblingsMethod · 0.95
__fixNodeRemoveMethod · 0.95

Calls 2

getLinkMethod · 0.80
getLinkIdxMethod · 0.80

Tested by

no test coverage detected