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~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/D2SKQUA2BLY7VNM5PEWGSHQQXM3ORTRJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to