New submission from Randy Henderson:

Even when a deque is populated in the Timer setup parameter, the interpreter 
gives "IndexError: pop from an empty deque".  IndexError is generated for lists 
as well.

>>> Timer(stmt='d.popleft()',setup='d=deque([1,2,3])',globals=globals()).timeit()
Traceback (most recent call last):
  File "<pyshell#75>", line 1, in <module>
 Timer(stmt='d.popleft()',setup='d=deque([1,2,3])',globals=globals()).timeit()
  File "C:\Program Files\Python\Python36\lib\timeit.py", line 178, in timeit
    timing = self.inner(it, self.timer)
  File "<timeit-src>", line 6, in inner
IndexError: pop from an empty deque

----------
components: Library (Lib)
messages: 299634
nosy: Randy Henderson
priority: normal
severity: normal
status: open
title: Timer error pop from empty deque/list
versions: Python 3.6

_______________________________________
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

Reply via email to