[Twisted-Python] Adapter for a class, not for an instance

glyph at divmod.com glyph at divmod.com
Tue Aug 21 18:31:07 EDT 2007

On 01:48 pm, bernat at luffy.cx wrote:
>Currently, adapters can transform an instance into another
>instance. I would like to use adapters to transform a class into
>an instance. Does something like that already exists ?

More correctly, adapters can transform an object into another object, 
based on what interfaces the original object provides.  So you can use 
it with class objects, if you want, just as much as you can use it with 
instance objects.

However, you probably want to ask this on the Zope Interface mailing 
list, not Twisted.  Also, I strongly suspect that whatever problem 
you're trying to solve with this would be better solved some other way, 
but that's just a hunch :).

More information about the Twisted-Python mailing list