The offset of *sub_category* in the overall sequence of leaf categories.
(self, sub_category)
| 553 | return self._parent.index(self) |
| 554 | |
| 555 | def index(self, sub_category): |
| 556 | """ |
| 557 | The offset of *sub_category* in the overall sequence of leaf |
| 558 | categories. |
| 559 | """ |
| 560 | index = self._parent.index(self) |
| 561 | for this_sub_category in self._sub_categories: |
| 562 | if sub_category is this_sub_category: |
| 563 | return index |
| 564 | index += this_sub_category.leaf_count |
| 565 | raise ValueError("sub_category not in this category") |
| 566 | |
| 567 | @property |
| 568 | def leaf_count(self): |
no outgoing calls
no test coverage detected