'Truncate the internal buffer and records.'

def truncate(self, size=None):

    if size:
        raise Exception(('invalid    size    argument:    %r,    should    be    None    or    0' % size))
    with self._lock:
        self._strm.truncate(0)
        self._val = None
        self._recs = list()
