#NEWLINE# def pair( self , d ) : #NEWLINE# #INDENT# 'Bind a survey to this problem instance using pointers.' #NEWLINE# assert isinstance ( d , self . surveyPair ) , ( 'Data object must be an instance of a %s class.' % self . surveyPair . __name__ ) #NEWLINE# if d . ispaired : #NEWLINE# #INDENT# raise Exception ( 'The survey object is already paired to a problem. Use survey.unpair()' ) #NEWLINE# #UNINDENT# self . _survey = d #NEWLINE# d . _prob = self