timeit

Skip Montanaro skip at pobox.com
Sat Jan 31 10:48:17 EST 2004


    Duncan> This is possibly a stupid question, but I need to get this
    Duncan> working quickly, and I guess I'm just too tired / pressured to
    Duncan> see what I'm doing wrong.  

Import the subtract module in a setup arg to your Timer() constructor:

    tim = timeit.Timer(setup-'import subtract', stmt=s)

Skip




More information about the Python-list mailing list