Message299638
You're right. I was expecting the code in stmt to be run only once, but I
just discovered in the documentation that the default is for it to be run
one million times. I provided the argument 'number=1' to the timeit()
method and am now getting the behavior I expected. I'll remove/close the
bug entry. Sorry -- newbie!
On Tue, Aug 1, 2017 at 1:58 PM, R. David Murray <report@bugs.python.org>
wrote:
>
> R. David Murray added the comment:
>
> Perhaps I'm missing something, but isn't this to be expected? Timer will
> run d.popleft() repeatedly until you get the error you see because the list
> is empty. Are you thinking that setup is run each time? That would defeat
> its purpose.
>
> ----------
> nosy: +r.david.murray
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue31099>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2017-08-01 22:21:55 | Randy Henderson | set | recipients:
+ Randy Henderson, r.david.murray |
2017-08-01 22:21:55 | Randy Henderson | link | issue31099 messages |
2017-08-01 22:21:55 | Randy Henderson | create | |
|