This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roysmith
Recipients LambertDW, pitrou, rhettinger, roysmith
Date 2008-12-18.01:53:08
SpamBayes Score 1.3134327e-10
Marked as misclassified No
Message-id <>
And, FWIW, I did figure out a use case for clear().  I create a queue and 
pass it to two threads.  One side or the other decides to abandon processing 
of the events currently in the queue.  I can't just create a new queue, 
because you have no way to tell the other thread about it.  You need to have 
clear() to do this.  And, no, it should not clear the high water mark.

As I see it, it comes down to this:

If you bury this in the C code inside deque(), it's very efficient compared 
to the Python wrapper class.  The downside is it makes the API larger than 
it would otherwise be, to satisfy a use case with limited demand.

If you feel the efficiency gain doesn't justify the added complexity in the 
API, I'm OK with that.  I just didn't want this shot down on the basis of, 
"He's asking us to invest the effort to write the code for something we 
don't see a need for", hence the offer to write it myself.  But, it's your 
call if you want it or not.
Date User Action Args
2008-12-18 01:53:10roysmithsetrecipients: + roysmith, rhettinger, pitrou, LambertDW
2008-12-18 01:53:10roysmithsetmessageid: <>
2008-12-18 01:53:09roysmithlinkissue4680 messages
2008-12-18 01:53:08roysmithcreate