<div dir="ltr"><a href="http://docs.python.org/2/library/collections.html#collections.deque">http://docs.python.org/2/library/collections.html#collections.deque</a><br><div><br></div><div>If I have a deque containing a large number of items, and I just want to know whether the deque is empty or not, I shouldn't have to call len().  But the documentation does not mention any way to check to see if the deque is empty without having to count the number of items.</div>
<div><br></div><div>It appears from what I've read on the internet (incl. <a href="http://stackoverflow.com/questions/5652278/python-2-7-how-to-check-if-a-deque-is-empty">http://stackoverflow.com/questions/5652278/python-2-7-how-to-check-if-a-deque-is-empty</a>) that there is an implicit conversion to bool which returns True if the deque contains any items, and returns False if the deque is empty.</div>
<div><br></div><div>If this is true, could you add this to the docs for deque?</div></div>