code: def retry_http( delays=default_delays, timeout=default_timeout, predicate=retryable_http_error ):
      
      return retry( delays=delays, timeout=timeout, predicate=predicate )
docs: >>> i = 0
      >>> for attempt in retry_http(timeout=5):  # doctest: +IGNORE_EXCEPTION_DETAIL
      ...     with attempt:
      ...         i += 1
      ...         raise urllib.error.HTTPError('http://www.test.com', '408', 'some message', {}, None)
      Traceback (most recent call last):
      ...
      HTTPError: HTTP Error 408: some message
      >>> i > 1
      True
      >>> i = 0
      >>> for attempt in retry_http(timeout=5):  # doctest: +IGNORE_EXCEPTION_DETAIL
      ...     with attempt:
      ...         i += 1
      ...         raise BadStatusLine('sad-cloud.gif')
      Traceback (most recent call last):
      ...
      BadStatusLine: sad-cloud.gif
      >>> i > 1
      True