def _divmod(a, b): if a.is_unknow() or b.is_unknow(): return Number.make_unknowt() x, y = divmod(a.value, b.value) return Tuple.from_elts(None, [Number.from_numbert(x), Number.from_numbert(y)])
def _pow(x, y, z=None): if x.is_unknow() or y.is_unknow() or z.is_unknow(): return Number.make_unknowt() if z: return Number.from_numbert(None, pow(x.value, y.value, z.value)) else: return Number.from_numbert(None, pow(x.value, y.value))
def _len(l): return Number.make_unknowt() # TODO values = l.get_attr("__len__") ret = set() for value in values: ret = ret.union(value.func_value.c_implement(l)) return ret
def _cmp(x, y): if x.is_unknow() or y.is_unknow(): return Number.make_unknowt() return Number.from_numbert(None, cmp(x.value, y.value))
def _ord(c): return Number.make_unknowt()