Ejemplo n.º 1
0
    go(f4, arg)


def go5(arg=FILELIST):
    go(f5, arg)


def go6(n=100000, p=100000000000001L):
    go(f6, n, p)


def go7(start=-2 - 1j, end=1 + 1j, step=0.04 + 0.08j):
    go(f7, start, end, step)


def go7bis(start=(-2.0, -1.0), end=(1.0, 1.0), step=(0.04, 0.08)):
    go(f7bis, start, end, step)


if __name__ == "__main__":
    go(f11, 50)
    go1()
    go4()
    go5()
    go6()
    go7()
    go7bis()
    go(f10)
    psyco.dumpcodebuf()
    print_results()
Ejemplo n.º 2
0
    def f1():
        return rect1.w * rect1.h
    def f2(a):
        rect1.w = a
    psyco.bind(f1)
    psyco.bind(f2)
    rect1.w = 6
    rect1.h = 7
    res = f1()
    assert res == 42
    f2(4)
    res = f1()
    assert res == 28
    f2(0.5)
    res = f1()
    assert res == 3.5

# ____________________________________________________________

if __name__ == '__main__':
    import time; print "break!"; time.sleep(1)
    #subprocess_test(10)
    #pcompact_test()
    #pcompact_creat('hel' + 'lo')
    #pcompact_modif('hel' + 'lo')
    #test_constant_obj()
    psyco.proxy(test_rect)()
    #psyco.proxy(test_special_attributes)()
    #psyco.proxy(test_data_descr)()
    psyco.dumpcodebuf()