def set_open_position(self, value): refresh_nb = False if self._open != value: refresh_nb = True self._open = tuple(value) if refresh_nb: self.neighbours_open_position = Lattice.get_neighbours_open(tuple(value))