def add_value(self, fm: 'FARGModel', value: Value, painter: Value = None): '''Returns 'value' with this Cell's CAddr added.''' value = fm.with_caddr(as_hashable(value), (self.canvas, self.addr)) for oldv in self.values: fm.add_mut_antipathy(oldv, value) self.values.add(value) fm.add_mut_support(value, painter) return value
def add(self, value: Value): self.values.add(as_hashable(value))
def add_value(self, source: Painter, value: Value): self.values.add(as_hashable(value))
def add(self, value: Value): value = with_addr(as_hashable(value), self.addr) if value not in self.values: for v in self.values: self.ws.add_mut_antipathy(v, value) self.values.add(value)