[Twisted-Python] Does anyone use instance-only interface implementation
E.g. Class Foo: pass o = Foo() o.__implements__ = (IBar,) If so, I'd like to hear about it, cause we may want to remove support for it. -- Itamar Shtull-Trauring http://itamarst.org Looking for a job: http://itamarst.org/resume.html
On Jan 4, 2004, at 4:30 PM, Itamar Shtull-Trauring wrote:
Class Foo: pass o = Foo() o.__implements__ = (IBar,)
If so, I'd like to hear about it, cause we may want to remove support for it.
I've used "instance-only interface implementation" when the instance at hand is Foo (the class itself, for its class methods), not Foo().. but that doesn't work with a stock version of Twisted anyways. I'm probably going to convert the code to PyProtocols next time it's unearthed for that (and other) reasons, but I figure it's worthy of mention. -bob
On Sun, 2004-01-04 at 17:00, Bob Ippolito wrote:
I've used "instance-only interface implementation" when the instance at hand is Foo (the class itself, for its class methods), not Foo().. but that doesn't work with a stock version of Twisted anyways. I'm probably going to convert the code to PyProtocols next time it's unearthed for that (and other) reasons, but I figure it's worthy of mention.
Well, this is actually the motivation. Want to fix the code so you can specify classes implementing interfaces, by setting __implements__ on their metaclass. http://twistedmatrix.com/users/roundup.twistd/twisted/issue457 -- Itamar Shtull-Trauring http://itamarst.org Looking for a job: http://itamarst.org/resume.html
participants (2)
-
Bob Ippolito
-
Itamar Shtull-Trauring