code: def wait(self, timeout=None):
          
          # The 'or' part is for Python 2.6
          result = self.__event.wait(timeout)
          # pylint: disable=E0702
          # Pylint seems to miss the "is None" check below
          if self.__exception is None:
              return result
          else:
              raise self.__exception
docs: Waits for the event or for the timeout
  
          :param timeout: Wait timeout (in seconds)
          :return: True if the event as been set, else False