

def collapsingPumpPolicy(queue, target):
    '\n    L{collapsingPumpPolicy} is a policy which collapses all outstanding chunks\n    into a single string and delivers it to the target.\n\n    @see: L{loopbackAsync}\n    '
    bytes = []
    while queue:
        chunk = queue.get()
        if (bytes is None):
            break
        bytes.append(chunk)
    if bytes:
        target.dataReceived(''.join(bytes))

dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/protocols/loopback.py collapsingPumpPolicy/VarMisuse@34/112 `chunk`->`bytes`