#NEWLINE# def classImplementsOnly( cls , * interfaces ) : #NEWLINE# #INDENT# 'Declare the only interfaces implemented by instances of a class\n\n      The arguments after the class are one or more interfaces or interface\n      specifications (``IDeclaration`` objects).\n\n      The interfaces given (including the interfaces in the specifications)\n      replace any previous declarations.\n    ' #NEWLINE# spec = implementedBy ( cls ) #NEWLINE# spec . declared = ( ) #NEWLINE# spec . inherit = None #NEWLINE# classImplements ( cls , * interfaces )