Roy Smith <[EMAIL PROTECTED]> added the comment: In retrospect, it's obvious that "while mydeque" is indeed the way to process the queue, yet, when I was reading the docs, I didn't come away with that.
The statement, "list objects support similar operations", is wishy-washy. It is not the same as saying "deque is a subclass of list" (which isn't true), nor "the set of operations supported by deque is a superset of those supported by list" (which also isn't true). Thus, you're left having to interpret the statement as a handwave that deques are sort-of list-like things, with some (indeterminate) set of operations in common. It's not at all obvious (or at least it wasn't to me) that one of those operations is evaluating the container in a boolean context to test for emptiness. Anyway, to more concretely answer your question, I'd just make the plain statement, "An empty deque evaluates as false", somewhere right on the page where the methods are listed. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3891> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com