title: How to check if object exists in queue before pushing new object
body: <p>I'm using a Python queue:</p>
  
  <pre><code>q = Queue.Queue()
  </code></pre>
  
  <p>I'm putting objects of a certain class into the aforementioned queue using <code>q.put(item)</code>. However, before putting the item into the queue, I would like to check if it exists in the queue already. Is there a way to do this? [without taking out all of the objects of the queue and then pushing them all back in]</p>
  
  <p>Additionally:</p>
  
  <p>I don't know how I could actually see the variables I'm putting into the queue (when debugging). I'm using Pydev, and all I could see in the <code>variables</code> window is stuff like <code>not_empty</code> and <code>not_full</code>. How could I see what's in the queue during run time?</p>