[Twisted-Python] Inheriting t.a.service.Service and super

Sébastien LELONG sebastien.lelong at dexia-securities.fr
Tue Mar 20 09:05:40 EDT 2007


I've been using Twisted for several months, and have frequently encountered 
the following problem. 

In my Twisted apps, I declare services (t.a.service.Service), which then I 
need to subclass. The problem is I can't call super() on such subclass, since 
the class Service in twisted does not inherit the built-in 'object' type 
("TypeError: super() argument 1 must be type, not classobj"). For now, I can 
use other form of superclass calling, but that can be error prone.

Is there any particular reason why class Service isn't a subclass of object ? 
It's kind of surprising since Service is designed to be subclassed.

Thanks in advance for your help/replies.


Sébastien LELONG

More information about the Twisted-Python mailing list