This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Randy Henderson
Recipients Randy Henderson, r.david.murray
Date 2017-08-01.22:21:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAPEQUoW+HJ5ypectuzomGz05EKZs9A4GitNE6ZpFKstLrhrHog@mail.gmail.com>
In-reply-to <1501621114.89.0.751336045895.issue31099@psf.upfronthosting.co.za>
Content
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>
> _______________________________________
>
History
Date User Action Args
2017-08-01 22:21:55Randy Hendersonsetrecipients: + Randy Henderson, r.david.murray
2017-08-01 22:21:55Randy Hendersonlinkissue31099 messages
2017-08-01 22:21:55Randy Hendersoncreate