docs for collections.deque do not mention how to check whether the deque is empty

Dec. 20, 2013
11:16 p.m.
http://docs.python.org/2/library/collections.html#collections.deque 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. It appears from what I've read on the internet (incl. http://stackoverflow.com/questions/5652278/python-2-7-how-to-check-if-a-dequ...) 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. If this is true, could you add this to the docs for deque?
4082
Age (days ago)
4082
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jason Sachs