Thread Question

Jarek Zgoda jzgoda at
Wed Mar 1 20:19:13 CET 2006

Just napisał(a):

> I always felt that subclassing Thread is very unpythonic. It seems like 
> an unfortunate leftover Javaism (much of was inspired by 
> Java, but I don't need to tell you that). If I need some state, I create 
> my own class, with a reference to the Thread object if needed. Has-a vs. 
> is-a.

For me, it's not a "javaism", but "delphism" (since I know
Delphi/ObjectPascal much better than Java). In fact, in most OO
languages I know, threads are modeled as classes. Followning common
practice in this matter makes sense when you program in many languages -
your threads will be always classes with similar repertoire of methods
and attributes.

Jarek Zgoda

More information about the Python-list mailing list