MCPcopy
hub / github.com/dask/dask / __init__

Method __init__

dask/rewrite.py:176–187  ·  view source on GitHub ↗
(self, lhs, rhs, vars=())

Source from the content-addressed store, hash-verified

174 """
175
176 def __init__(self, lhs, rhs, vars=()):
177 if not isinstance(vars, tuple):
178 raise TypeError("vars must be a tuple of variables")
179 self.lhs = lhs
180 if callable(rhs):
181 self.subs = rhs
182 else:
183 self.subs = self._apply
184 self.rhs = rhs
185 self._varlist = [t for t in Traverser(lhs) if t in vars]
186 # Reduce vars down to just variables found in lhs
187 self.vars = tuple(sorted(set(self._varlist)))
188
189 def _apply(self, sub_dict):
190 term = self.rhs

Callers

nothing calls this directly

Calls 2

TraverserClass · 0.85
setClass · 0.85

Tested by

no test coverage detected