On Dec 18, 2008, at 3:06 PM, Tristan Seligmann wrote:

* Alec Flett <al...@metaweb.com> [2008-12-18 11:03:48 -0800]:


On Dec 18, 2008, at 6:04 AM, Drew Smathers wrote:

Protocol is an old-style class - doesn't inherit from object - so
property won't work in that context.  This won't be a problem in
python 3 - old-style/new-style classes are consolidated.


Is there any interest in adding 'object' to some of the core classes
like Deferred, in a future release of Twisted? It would help with some
debugging/logging (because there's better introspection)

The proble with doing this is that it is a backwards-incompatible change;
doing this in a way that would comply with Twisted's backwards
compatibility policy would be somewhat awkward:

http://twistedmatrix.com/trac/wiki/CompatibilityPolicy

The only way this could be done would be to do so in an "opt-in" fashion. E.g. something like:
import twisted
twisted.useNewStyleClasses(True)

But even that would be global for a given instantiation of the python interpreter which isn't really very good either if you need to mix new- style-expecting and old-style-expecting classes.

So it really doesn't esem worth it, given that people can mixin object themselves if they desire.

James

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to