Gather all leaf-operands of specified types.
(self, *types)
| 97 | self.args = list(self.original_args) |
| 98 | |
| 99 | def atoms(self, *types): |
| 100 | """Gather all leaf-operands of specified types.""" |
| 101 | atoms = OrderedSet() |
| 102 | # Recursively collect atoms |
| 103 | for arg in self.args: |
| 104 | if isinstance(arg, Operand): |
| 105 | atoms.update(arg.atoms(*types)) |
| 106 | return atoms |
| 107 | |
| 108 | def has(self, *vars): |
| 109 | """Determine if tree contains any specified operands/operators.""" |
no test coverage detected