Randy Henderson added the comment: 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 <rep...@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 <rep...@bugs.python.org> > <http://bugs.python.org/issue31099> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31099> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com