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

Method __getRightSibling

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

Returns right sibling of a node

(self, node)

Source from the content-addressed store, hash-verified

263 return node.parent.getLink(node.parent.getLinkIdx(node) - 1)
264
265 def __getRightSibling(self, node):
266 """ Returns right sibling of a node """
267 if (node and node.parent) is not None:
268 return node.parent.getLink(node.parent.getLinkIdx(node) + 1)
269
270 def __getSiblings(self, node):
271 """ Returns node's siblings """

Callers 2

__getSiblingsMethod · 0.95
__fixNodeRemoveMethod · 0.95

Calls 2

getLinkMethod · 0.80
getLinkIdxMethod · 0.80

Tested by

no test coverage detected