def getAdapterFactory(fromInterface, toInterface, default):
 self = globalRegistry
 if (not isinstance(fromInterface, interface.InterfaceClass)):
  fromInterface = declarations.implementedBy(fromInterface)
 factory = self.lookup1(fromInterface, toInterface)
 if (factory is None):
  factory = default
 return factory

def getAdapterFactory ( fromInterface , toInterface , default ) : self = globalRegistry if ( not isinstance ( fromInterface , interface . InterfaceClass ) ) : fromInterface = declarations . implementedBy ( fromInterface ) factory = self . lookup1 ( fromInterface , toInterface ) if ( factory is None ) : factory = default return factory
return registered adapter for a given class and interface .