Getting started with python

James Stroud jstroud at mbi.ucla.edu
Tue Apr 17 03:14:26 EDT 2007


7stud wrote:
> On Apr 15, 9:49 pm, James Stroud <jstr... at mbi.ucla.edu> wrote:
>> py> t = timeit.Timer(stmt=s)
>> py> print "%.2f usec/pass" % (1000000 * t.timeit(number=100000)/100000)
>> 40.88 usec/pass
>>
> 
> What does this accomplish:
> 
> 1000000 * t.timeit(number=100000)/100000
> 
> that the following doesn't accomplish:
> 
> 10 * t.timeit(number=100000)
> 

I have no idea--copy and pasted from timeit documentation.

James



More information about the Python-list mailing list