Generate a dict with all ancestors with keys indicating parent-child relations.
(self, parents=[])
| 695 | yield (self.name, self) |
| 696 | |
| 697 | def _flatten(self, parents=[]): |
| 698 | """ |
| 699 | Generate a dict with all ancestors with keys indicating parent-child relations. |
| 700 | """ |
| 701 | |
| 702 | rv = {} |
| 703 | |
| 704 | for ch in self.children: |
| 705 | rv.update(ch._flatten(parents=parents + [self.name])) |
| 706 | |
| 707 | rv[PATH_DELIM.join(parents + [self.name])] = self |
| 708 | |
| 709 | return rv |
| 710 | |
| 711 | def __iter__( |
| 712 | self, |