[New-bugs-announce] [issue3891] collections.deque should have empty() method
Roy Smith
report at bugs.python.org
Wed Sep 17 23:17:09 CEST 2008
New submission from Roy Smith <roy at panix.com>:
Unless I'm missing something, the only way to tell if a deque is empty is
to try and pop() something and catch the resulting IndexError. This is
not only awkward, but mutates the data structure when you may not want to.
It should be trivial to implement, and run in O(1) time.
----------
components: Library (Lib)
messages: 73344
nosy: roysmith
severity: normal
status: open
title: collections.deque should have empty() method
type: feature request
versions: Python 2.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3891>
_______________________________________
More information about the New-bugs-announce
mailing list