In article <[EMAIL PROTECTED]>,
Kent Johnson  <[EMAIL PROTECTED]> wrote:
>D wrote:
>>
>> My question is, how would I go
>> about creating the thread?  I have seen examples that used classes, and
>> other examples that just called one thread start command - when should
>> you use one over another?
>
>For simple use it doesn't matter. Use a class when you want to add more 
>state or behaviour - for example you might want a flag that tells the 
>thread to stop, or a Queue to communicate with the thread. A class might 
>be more convenient in these cases.
>
>IOW if you can write it as a single function it doesn't matter much 
>which form you use; for more complex usage you may want a class.

OTOH, always subclassing requires less thinking.
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

"19. A language that doesn't affect the way you think about programming,
is not worth knowing."  --Alan Perlis
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to