Message369240
Is this different than what you would expect?
Supplying garbage to timeit will result in an error:
>>> from timeit import timeit
>>> timeit('weofinwofinwe')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/timeit.py", line 232, in timeit
return Timer(stmt, setup, timer, globals).timeit(number)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/timeit.py", line 176, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
NameError: name 'weofinwofinwe' is not defined
If you want to time an empty loop, you can use:
>>> timeit('pass', number=10000)
0.0001043230000021822 |
|
Date |
User |
Action |
Args |
2020-05-18 15:15:08 | remi.lapeyre | set | recipients:
+ remi.lapeyre, anthonypjshaw, edison.abahurire |
2020-05-18 15:15:08 | remi.lapeyre | set | messageid: <1589814908.66.0.437066863038.issue40670@roundup.psfhosted.org> |
2020-05-18 15:15:08 | remi.lapeyre | link | issue40670 messages |
2020-05-18 15:15:08 | remi.lapeyre | create | |
|