<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-1 if I may.<div><br class="webkit-block-placeholder"></div><div>I use qsize() to sustain an average queue size (unreliably) but not allowing the queue to be full. Certainly, this could be done in some other way, but the existence of the method remains very useful.</div><div><br class="webkit-block-placeholder"></div><div>cheers</div><div><br class="webkit-block-placeholder"></div><div><br><div><div>On Jan 11, 2008, at 8:13 PM, Raymond Hettinger wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I proposed to remove three methods from the queue module, qsize(), empty(), and full(). &nbsp;These are not reliable. &nbsp;The RightWay (tm) is to trap the Empty and Full exceptions or use the .join() approach.<br><br>Raymond<br><br><br>--- From the docs ---<br><br>Queue.qsize()¶<br> &nbsp;&nbsp;&nbsp;Return the approximate size of the queue. Because of multithreading semantics, this number is not reliable.<br><br>Queue.empty()¶<br> &nbsp;&nbsp;&nbsp;Return True if the queue is empty, False otherwise. Because of multithreading semantics, this is not reliable.<br><br>Queue.full()¶<br> &nbsp;&nbsp;&nbsp;Return True if the queue is full, False otherwise. Because of multithreading semantics, this is not reliable.<br>_______________________________________________<br>Python-3000 mailing list<br><a href="mailto:Python-3000@python.org">Python-3000@python.org</a><br>http://mail.python.org/mailman/listinfo/python-3000<br>Unsubscribe: http://mail.python.org/mailman/options/python-3000/miguel.branco%40cern.ch<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" face="arial" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">--</span></font></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Miguel Branco, CERN - ATLAS Computing Group</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">MSN: <a href="mailto:msbranco@hotmail.com">msbranco@hotmail.com</a></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">  +41 22 76 71268 - <a href="http://cern.ch/mbranco/">http://cern.ch/mbranco/</a></span></div></div></span></div></span> </div><br></div></body></html>