>>> root = Node(2) >>> len(root) 1 >>> root.left = Node(1) >>> len(root) 2
(self)
| 32 | yield from self.right |
| 33 | |
| 34 | def __len__(self) -> int: |
| 35 | """ |
| 36 | >>> root = Node(2) |
| 37 | >>> len(root) |
| 38 | 1 |
| 39 | >>> root.left = Node(1) |
| 40 | >>> len(root) |
| 41 | 2 |
| 42 | """ |
| 43 | return sum(1 for _ in self) |
| 44 | |
| 45 | @property |
| 46 | def is_sum_node(self) -> bool: |
nothing calls this directly
no outgoing calls
no test coverage detected