Namespace for timeit

Skip Montanaro skip.montanaro at gmail.com
Fri Oct 14 13:59:19 EDT 2016


>     timeit('sorter( array, size )', number=1)

I'm not a timeit whiz, but I'm kind of surprised there isn't a call form
where it goes something like

    timeit(callable, *args, ...)

There is a globals keyword argument though. I think you could probably call
it with globals=locals() in your case.

Skip



More information about the Python-list mailing list