def restore(self): decoded = TupleID.unpickle_args( TupleID.tuplize(self.atok.get_text(self.node.elts[1])), self.reader.pickledata ) decoded = rel_to_abs_tuple(decoded, self.obj._tupleid) return mxsys.get_object_from_tupleid(decoded)
def _set_dynamic_inputs(self, tupleid, keyid, valid): tupleid = TupleID.unpickle_args(tupleid, self.pickledata) cells = mxsys.get_object_from_tupleid(tupleid) key = self.pickledata[keyid] value = self.pickledata[valid] cells._impl.set_value(key, value)
def test_get_object_from_tuple(testmodel): testmodel.SpaceA.formula = lambda x: None s = mxsys.get_object_from_tupleid(("ModelA", "SpaceA", (1, ))) assert s is testmodel.SpaceA[1]