Re: [Tutor] Help with Python Queue

2016-11-26 Thread Joaquin Alzola
>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 (

Re: [Tutor] Help with Python Queue

2016-11-26 Thread Anish Tambe
> AttributeError: Queue instance has no attribute 'taskdone' Method name is task_done (not taskdone) https://docs.python.org/2/library/queue.html#Queue.Queue.task_done ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] Help with Python Queue

2016-11-26 Thread Alan Gauld via Tutor
On 26/11/16 09:07, anish singh wrote: > I have below code but it is giving this error: > AttributeError: Queue instance has no attribute 'taskdone' Please post the full error not just a summary. Also please post the actual code... > import threading > from Queue import Queue I get an import er

Re: [Tutor] inquiry

2016-11-26 Thread Steven D'Aprano
Hi Phoenix, welcome! On Sat, Nov 26, 2016 at 12:59:37PM +0800, zxjhust1 wrote: > I have some questions about memory mechanism of python. Do the > elements of the parent go into the namespace of the subclass > when we define subclass? I don't quite understand your question. I *think* you are as

Re: [Tutor] inquiry

2016-11-26 Thread Alan Gauld via Tutor
On 26/11/16 04:59, zxjhust1 wrote: > Dear tutors: >I have some questions about memory mechanism of python. Depending on the level of detail you need this might be more appropriate to the general Python list. Implementation details are usually a bit too advanced for most readers of tutor.

[Tutor] Help with Python Queue

2016-11-26 Thread anish singh
I was just writing to read a file using popen and wanted to use queue along with it. 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() prin

[Tutor] inquiry

2016-11-26 Thread zxjhust1
| Dear tutors: I have some questions about memory mechanism of python. Do the elements of the parent go into the namespace of the subclass when we define subclass? As far as I'm concerned, they do go into the namespace of the subclass. Because when we use dir(), we can see all the elemen