MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / __bool__

Method __bool__

python/bplustree/bplus_tree.py:251–253  ·  view source on GitHub ↗

Return True if tree is not empty

(self)

Source from the content-addressed store, hash-verified

249 return self.leaves.key_count()
250
251 def __bool__(self) -> bool:
252 """Return True if tree is not empty"""
253 return len(self) > 0
254
255 def __delitem__(self, key: Any) -> None:
256 """Delete a key (dict-like API)"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected