#NEWLINE# def get_user_question( self , question , fast = False , bust_questions_cache = False ) : #NEWLINE# #INDENT# "Get a :class:`~okcupyd.question.UserQuestion` corresponding to the\n        given :class:`~okcupyd.question.Question`.\n\n        HUGE CAVEATS: If the logged in user has not answered the relevant\n        question, it will automatically be answered with whatever the first\n        answer to the question is.\n\n        For the sake of reducing the number of requests made when\n        this function is called repeatedly this function does not\n        bust the cache of this :class:`~.User`'s\n        :attr:`okcupyd.profile.Profile.questions` attribute. That means that\n        a question that HAS been answered could still be answered by\n        this function if this :class:`~.User`'s\n        :attr:`~okcupyd.profile.P:attr:`okcupyd.profile.Profile.questions`\n        was populated previously (This population happens automatically --\n        See :class:`~okcupyd.util.fetchable.Fetchable` for details about when\n        and how this happens).\n\n        :param question: The question for which a\n                         :class:`~okcupyd.question.UserQuestion` should\n                         be retrieved.\n        :type question: :class:`~okcupyd.question.BaseQuestion`\n        :param fast: Don't try to look through the users existing questions to\n                     see if arbitrarily answering the question can be avoided.\n        :type fast: bool\n        :param bust_questions_cache: clear the\n                                     :attr:`~okcupyd.profile.Profile.questions`\n                                     attribute of this users\n                                     :class:`~okcupyd.profile.Profile`\n                                     before looking for an existing answer.\n                                     Be aware that even this does not eliminate\n                                     all race conditions.\n        :type bust_questions_cache: bool\n        " #NEWLINE# if bust_questions_cache : #NEWLINE# #INDENT# self . profile . questions ( ) #NEWLINE# #UNINDENT# user_question = ( None if fast else self . profile . find_question ( question . id ) ) #NEWLINE# if ( user_question is None ) : #NEWLINE# #INDENT# self . questions . respond ( question . id , [ 1 ] , [ 1 ] , 3 ) #NEWLINE# for _ in range ( 10 ) : #NEWLINE# #INDENT# start_time = time . time ( ) #NEWLINE# user_question = self . profile . find_question ( question . id , self . profile . question_fetchable ( recent = 1 ) ) #NEWLINE# if ( start_time is None ) : #NEWLINE# #INDENT# log . debug ( 'Could not find question with id {0} in questions.' . format ( question . id ) ) #NEWLINE# if ( ( time . time ( ) - start_time ) < 1 ) : #NEWLINE# #INDENT# time . sleep ( 1 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return user_question