Beispiel #1
0
def builtin2_n(f, sig, **kwargs):
    def f2(context, code, t1, t2):
        return f(context, code, (t1, t2))
    f2.__name__ = f.__name__
    b = Builtin(f2, (sig, sig), **kwargs)
    builtin_list.append(b)
    b.set_group_eval(f)
    return f
Beispiel #2
0
def builtin1_n(f, sig, **kwargs):
    b = Builtin(f, (sig,), **kwargs)
    builtin_list.append(b)
    def fn(context, code, args):
        for arg in args:
            f(context, code, arg)
    b.set_group_eval(fn)
    return f