Raymond Hettinger schrieb:
> I proposed to remove three methods from the queue module, qsize(),
> empty(), and full(). These are not reliable. The RightWay (tm) is
> to trap the Empty and Full exceptions or use the .join() approach.
I am actively using empty(). This code example receives and processes requests
into a database, and does a commit when there is nothing to do. It can
certainly be written in a different way, but I'm happy with it:
while 1:
if self.queue.empty():
database.commit()
request = self.queue.get()
database.process(request)
Please keep them.
Thomas
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com