Open DeanLight opened 2 years ago
""" a[x:int = ] """ """ a[x:str = "hello world" ] """ """ b[x:ExpNode = 5 ] """ type="ExpNode" val = "a~1" constructor = getName("ExpNode") try: instance = constructor(val) Except: print("Error") if getattr(instance, __eq__) == None: raise ("equality not found for type {type}") instance == match['b']['x'] __eq__ int("5") int("fsd")
class Result: nx_pointer mapper __getitem__(self, key): nx_pointer.get_node_attributes(self.nx_pointer, mapper[key])