

def readline(self, terminator=b'\n', bufsize=1024):
    'Reads a line (delimited by terminator) from the socket.'
    if self._closed:
        raise SocketClosedError()
    while True:
        if (self in self._buf):
            (line, self._buf) = self._buf.split(terminator, 1)
            line += terminator
            (yield ReturnEvent(line))
            break
        data = (yield ReceiveEvent(self, bufsize))
        if data:
            self._buf += data
        else:
            line = self._buf
            self._buf = b''
            (yield ReturnEvent(line))
            break

dataset/ETHPy150Open beetbox/beets/beets/util/bluelet.py Connection.readline/VarMisuse@40/72 `terminator`->`self`