Overwriting / reassigning instance / garbage collection?

Ken Godee ken at perfect-image.com
Thu Oct 30 14:19:37 EST 2003


Werner Schiendl wrote:

>> q1 now has a new address, so I'm
>> assuming the old q1 instance now has a
>> reference count of zero and python will garbage collect it?????
>>
> 
> of course, the old one will eventually be garbage collected.
> 
> The question is, what do you actually want to do?
> 

Actually, all I want to do is "clear" the queue.

I saw some other queue modules and they include
a method to clear the queue.
ie...

q1.clear()

but as far as I can tell the standard included Queue module
that comes with python lacks this method.







More information about the Python-list mailing list