[Twisted-web] Old Style python classes in Twisted
ardesai at yahoo.com
Sat Oct 6 17:22:13 EDT 2012
Given that twisted tutorials and other written materials show examples of derived classes for Protocol, HTTP Request etc., is there a good reason for many classes (almost all I suspect) (e.g. 'class Request' , 'class BaseProtocol', 'class _PauseableMixin', etc.) to be old style classes as opposed to a new style python classes?
Given that newer versions of twisted (and user apps) run on newer versions of python, I initially (a few years ago) tried to call the base class using super(), but was surprised to find twisted implements using old style classes.
New style classes make it easy to call a base class method (by using super). Would the MRO in new style classes make it better or worse? However, nothing wrong with old style classes, esp. if twisted depends on the depth-first MRO of old style classes.
Can someone clarify whether use of old style classes is intentional (e.g. due to MRO)?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web