def __init__(self, values=None): super().__init__() self.is_any = values is None self.attributes = Field() self.values = [] self.append_func = FuncValue(functions_builtin.AppendFunction(self), self) self.attributes.get_attribute('append').revise(self.append_func)
def apply_to_object(self, obj: 'Object'): append_func = Object( FuncValue(functions_builtin.AppendFunction(self), obj)) obj.attributes.get_attribute('append').revise(append_func)