MCPcopy Create free account
hub / github.com/DedalusProject/dedalus / has

Method has

dedalus/core/future.py:108–115  ·  view source on GitHub ↗

Determine if tree contains any specified operands/operators.

(self, *vars)

Source from the content-addressed store, hash-verified

106 return atoms
107
108 def has(self, *vars):
109 """Determine if tree contains any specified operands/operators."""
110 # Check for matching operator
111 if any(isinstance(self, var) for var in vars if isinstance(var, type)):
112 return True
113 # Check arguments
114 else:
115 return any(arg.has(*vars) for arg in self.args if isinstance(arg, Operand))
116
117 def replace(self, old, new):
118 """Replace specified operand/operator."""

Callers 9

build_EVPMethod · 0.45
expandMethod · 0.45
_build_basesMethod · 0.45
expandMethod · 0.45
require_linearityMethod · 0.45
splitMethod · 0.45
require_linearityMethod · 0.45
expandMethod · 0.45
require_first_orderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected