Bringing this back on list: On Tue, Aug 24, 2021 at 9:58 PM David Mertz, Ph.D. <david.me...@gmail.com> wrote:
> Sorry, I should have been more explicit. The several kinda of queues can > all "contain" items, but do not respond to len(). > yeah, I should have looked more closely at your list Though i would consider that an oversight, len(a_queue) could be handy. There is qsize() -- I wonder if there's a reason not to have __len__ do the same thing -- O(n) maybe? See Guido's point that there's an assumption tha len() will be O(1). This is an argument for the OP's point -- there is no standard way to check emptiness. -CHB -- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ 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/EEK7QHRGT2P5WLEOOJCPJQSR6VEDAJVC/ Code of Conduct: http://python.org/psf/codeofconduct/