'Returns an iterator of object lines from an uncompressed or compressed
text object.
Uncompress object as it is read if the object\'s name ends with \'.gz\'.
:param account: The object\'s account.
:param container: The object\'s container.
:param obj: The object.
:param acceptable_statuses: List of status for valid responses,
defaults to (2,).
:raises UnexpectedResponse: Exception raised when requests fail
to get a response with an acceptable status
:raises Exception: Exception is raised when code fails in an
unexpected way.'

def iter_object_lines(self, account, container, obj, headers=None, acceptable_statuses=(2,)):

    headers = (headers or {})
    path = self.make_path(account, container, obj)
    resp = self.make_request('GET', path, headers, acceptable_statuses)
    if (not ((resp.status_int // 100) == 2)):
        return
    last_part = ''
    compressed = obj.endswith('.gz')
    d = zlib.decompressobj((16 + zlib.MAX_WBITS))
    for chunk in resp.app_iter:
        if compressed:
            chunk = d.decompress(chunk)
        parts = chunk.split('\n')
        if (len(parts) == 1):
            last_part = (last_part + parts[0])
        else:
            parts[0] = (last_part + parts[0])
            for part in parts[:(-1)]:
                (yield part)
            last_part = parts[(-1)]
    if last_part:
        (yield last_part)
