I'm using a Python queue:
q = Queue.Queue()
I'm putting objects of a certain class into the aforementioned queue using q.put(item). 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]
Additionally:
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 variables window is stuff like not_empty and not_full. How could I see what's in the queue during run time?