'Reset the input buffer and associated state.'

def reset(self):

    self.indent_spaces = 0
    self._buffer[:] = []
    self.source = ''
    self.code = None
    self._is_complete = False
    self._is_invalid = False
    self._full_dedent = False
