Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of t
(self, other)
| 1431 | return 1 |
| 1432 | |
| 1433 | def contains_branch(self, other): |
| 1434 | """ |
| 1435 | Return whether the given transform is a sub-tree of this transform. |
| 1436 | |
| 1437 | This routine uses transform equality to identify sub-trees, therefore |
| 1438 | in many situations it is object id which will be used. |
| 1439 | |
| 1440 | For the case where the given transform represents the whole |
| 1441 | of this transform, returns True. |
| 1442 | """ |
| 1443 | if self.depth < other.depth: |
| 1444 | return False |
| 1445 | |
| 1446 | # check that a subtree is equal to other (starting from self) |
| 1447 | for _, sub_tree in self._iter_break_from_left_to_right(): |
| 1448 | if sub_tree == other: |
| 1449 | return True |
| 1450 | return False |
| 1451 | |
| 1452 | def contains_branch_separately(self, other_transform): |
| 1453 | """ |