(self, num=None)
return out
Empty buffer and return contents.
Empty buffer and return contents.
Empty buffer and return contents .
def _flush(self, num=None):
        """Empty buffer and return contents."""
        out = []
        if num is None:
            num = len(self._buf)
        if self._buf:
            # can be one or two-byte sequence in self._buf
            out.append(self._buf[:num])
        self._buf = self._buf[num:]
        return out
def _flush ( self , num = None ) : out = [ ] if num is None : num = len ( self . _buf ) if self . _buf : # can be one or two-byte sequence in self._buf out . append ( self . _buf [ : num ] ) self . _buf = self . _buf [ num : ] return out