Strange Queue error

Chris Liechti cliechti at gmx.net
Wed Jul 24 16:34:37 EDT 2002


mnations at airmail.net (Marc) wrote in 
news:4378fa6f.0207241120.1876187b at posting.google.com:

> I was attempting to use the Queue and came across a strange error. Why
> is Python wanting a Queue instance as an argument and not accepting
> the tuple. I was simply trying to put this on the queue:
>     qlist.put( (sleep, 5) )
> 
> Here is the error.
> 
> C:\Python22\CAP v1.0\queue>python temp2.py
>   File "security.py", line 35, in uid_gen_format
>     qlist.put( (sleep, 5) )
> TypeError: unbound method put() must be called with Queue instance as
> first argument (got tuple instance instead)
> 
> Does anyone know what this means?

looks like your qlist is a class an not an instance.
did you forgot the "()"?

qlist = Queue.Queue()
    	    	    	   ^^

if its not that, please show the definition of qlist.

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list