class Motif: # ... def coup_simple(self, *args): coups = [] if self.on(*args): x, y = self.to_coords(*args) for direction in DIRECTIONS: motif, arrivee = self.simple(direction, x, y) if motif is not None: coups.append((motif, arrivee)) return coups