def onRelease(self, event): self.end = event trip = Trip((self.start.x, self.start.y), (self.end.x, self.end.y)) trips.append(trip) trip.display()