Create a class which proxies all method calls which adhere to an interface to another provider of that interface.

This function is intended for creating specialized proxies. The typical way to use it is by subclassing the result:

  class MySpecializedProxy(proxyForInterface(IFoo)):
      def someInterfaceMethod(self, arg):
          if arg == 3:
              return 3
          return self.original.someInterfaceMethod(arg)
ParametersifaceThe Interface to which the resulting object will conform, and which the wrapped object must provide.
originalAttributename of the attribute used to save the original object in the resulting class. Default to original. (type: str)
ReturnsA class whose constructor takes the original object as its only argument. Constructing the class creates the proxy.
Function __init__ Undocumented
def __init__(self, original): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.