using timeit for a function in a class

Kent Johnson kent37 at tds.net
Thu May 26 16:47:06 EDT 2005


flupke wrote:
> 
> Hi,
> 
> i tried to use timeit on a function in a class but it doesn't do what i 
> think it should do ie. time :)
> In stead it starts printing line after line of hello time test!
> What am i doing wrong in order to time the f function?

Hmm, by default Timer.timeit() calls the function being timed 1000000 times. That's a lot of "hello 
time test" =:-)

Kent



More information about the Python-list mailing list