def _case_when(__data, cases): if not isinstance(cases, dict): raise Exception("Cases must be a dictionary") dict_entries = dict( (strip_symbolic(k), strip_symbolic(v)) for k, v in cases.items()) cases_arg = Lazy(DictCall("__call__", dict, dict_entries)) return create_sym_call(case_when, __data, cases_arg)
def _if_else(__data, *args, **kwargs): return create_sym_call(if_else, __data, *args, **kwargs)