def dist(a, b):
    return sum((i-j)**2 for i, j in zip(a, b))
def _resetExpect(self):
        self.previousExpectLine = ""
        if self._connection is not None and isinstance(self._connection.buffer, str):
            self.previousExpectLine = self._connection.buffer 
            self._connection.buffer = ""