Kent Johnson wrote: > 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
Hehe, thanks Kent. Need to drink more coffee and train the eyes more, a new goal in life :) print t.timeit(1) did the trick. Regards, Benedict -- http://mail.python.org/mailman/listinfo/python-list