
Aug. 24, 2021
11:46 p.m.
On 8/24/21 4:35 PM, Cameron Simpson wrote:
If we're chasing rough edges, consider queue.Queue:
>>> from queue import Queue >>> Q = Queue() >>> Q.empty() True >>> if Q: print("Q is true") ... Q is true
I would often like to treat Queues as a container of queued items, basicly because I'd like to be able to probe for the presence of queued items via the emptiness idiom. But I can't. It does has a .empty() method.
I don't even know what my point is here :-(
Perhaps that's it's irritating when containers redefine something vs nothing? ;-) -- ~Ethan~