Steven D'Aprano wrote in news:[EMAIL PROTECTED] in 
comp.lang.python:

>> So the question is: whats going on with timeit.Timer ?
> 
> As far as I can see, nothing. I think you have misunderstood the results 
> you got.

No, the answer is that is it repeats a million times.  It might better be
called repeat_one_million_times().

Or put another way, myself and the OP misinterpreted what the call 
t1.repeat( number = 1 ) did.

its a confusing API.

For the OP:

The call t1.timeit() is equivalent to t1.repeat( number = 1000000 ).

So it bennefits from memoization because the call *is* repeated, not
just called once like you intended.

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to