

def read(fd, bufsize=None):
    'Event: read from a file descriptor asynchronously.'
    if (bufsize is None):

        def reader():
            buf = []
            while True:
                data = (yield read(fd, 1024))
                if (not data):
                    break
                buf.append(data)
            (yield ReturnEvent(''.join(buf)))
        return DelegationEvent(reader())
    else:
        return ReadEvent(fd, fd)

dataset/ETHPy150Open beetbox/beets/beets/util/bluelet.py read/VarMisuse@106/135 `bufsize`->`fd`