def classImplementsOnly(cls, *interfaces):
 spec = implementedBy(cls)
 spec.declared = ()
 spec.inherit = None
 classImplements(cls, *interfaces)

def classImplementsOnly ( cls , * interfaces ) : spec = implementedBy ( cls ) spec . declared = ( ) spec . inherit = None classImplements ( cls , * interfaces )
declare the only interfaces implemented by instances of a class the arguments after the class are one or more interfaces or interface specifications .