[Twisted-Python] python properties in twisted don't work
exarkun at divmod.com
Thu Dec 18 08:59:30 EST 2008
On Thu, 18 Dec 2008 14:35:00 +0100, Gabriel Rossetti <gabriel.rossetti at arimaz.com> wrote:
>I have a problem, if I try to use python property in a twisted program, it
>doesn't really work...the accessor works but as soon as I use the mutator,
>it no longer uses the property (and doesn't set the "real" variable. I tried
>an example without twisted, it works, and with the twisted example it
>doesn't... does anyone know what is going on? Thank you!
Property setters only work on new-style classes. Many classes defined by
Twisted are classic, so they will not work with properties unless you make
your subclass new-style, which you can do by mixing in object.
More information about the Twisted-Python