[Twisted-Python] Phasing out old-style classes
James Y Knight
foom at fuhm.net
Thu Oct 8 18:13:31 MDT 2009
On Oct 8, 2009, at 7:59 PM, Mark Visser wrote:
> I've been bitten a couple times by twisted's use of old-style classes.
> Now that Jython is finally off the 2.2 branch, is there any real
> reason
> to stay backwards compatible?
I don't see any reason to make this change for twisted running on the
2.x branch of CPython.
Switching all the classes in twisted to newstyle before then could
break some user's code or tests, and doesn't really provide any
benefits as far as I can tell.
For Python 3.x, oldstyle classes don't exist, so that'll happen
automatically during the conversion.
Apparently in PyPy, oldstyle classes are significantly slower than
newstyle classes. So it might be interesting for them to force
everything in twisted.* to be newstyle classes and see what breaks. :)
James
More information about the Twisted-Python
mailing list