Check if key exists (for 'in' operator)
(self, key: Any)
| 236 | return value if value is not None else default |
| 237 | |
| 238 | def __contains__(self, key: Any) -> bool: |
| 239 | """Check if key exists (for 'in' operator)""" |
| 240 | node = self.root |
| 241 | while not node.is_leaf(): |
| 242 | node = node.get_child(key) |
| 243 | |
| 244 | pos, exists = node.find_position(key) |
| 245 | return exists |
| 246 | |
| 247 | def __len__(self) -> int: |
| 248 | """Return number of key-value pairs""" |
nothing calls this directly
no test coverage detected