[Tutor] Help with Python Queue

Joaquin Alzola Joaquin.Alzola at lebara.com
Sat Nov 26 18:45:37 EST 2016


>I have below code but it is giving this error:
>AttributeError: Queue instance has no attribute 'taskdone'

>import threading
>from Queue import Queue

>def worker(q):
>    while True:
>      dataset = q.get()
>      print("q is taken out")
>      q.taskdone()

Per documentation it is task_done (I suppose you are using python 3+)

https://docs.python.org/3.5/library/queue.html


This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt.


More information about the Tutor mailing list