def _iter_content_generator(response, decode_unicode):
    """Generator used to yield 100 KiB chunks for a given response."""
    for chunk in response.iter_content(100 * 1024, decode_unicode=decode_unicode):
        if decode_unicode:
            # Replace CRLF newlines with LF, Python will handle
            # platform specific newlines if written to file.
            chunk = chunk.replace('\r\n', '\n')
            # Chunk could be ['...\r', '\n...'], stril trailing \r
            chunk = chunk.rstrip('\r')
        yield chunk
def _iter_content_generator ( response , decode_unicode ) : for chunk in response . iter_content ( 100 * 1024 , decode_unicode = decode_unicode ) : if decode_unicode : chunk = chunk . replace ( '\r\n' , '\n' ) chunk = chunk . rstrip ( '\r' ) yield chunk
Generator used to yield 100 KiB chunks for a given response.