MCPcopy Create free account
hub / github.com/M-Nauta/ProtoTree / depth

Method depth

prototree/prototree.py:230–232  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

228
229 @property
230 def depth(self) -> int:
231 d = lambda node: 1 if isinstance(node, Leaf) else 1 + max(d(node.l), d(node.r))
232 return d(self._root)
233
234 @property
235 def size(self) -> int:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected