I know it's not that bad, but I can't help but wonder if there is a way to make this DRY-er.s = self.starte = self.endif s.x > e.x:    s.x, e.x = e.x, s.xif s.y > e.y:    s.y, e.y = e.y, s.y
How to make this snippet DRY (Don't Repeat Yourself)
python;python 3.x
You basicaly want to sort your data, you may be interested in sorted then:start = self.startend = self.endstart.x, end.x = sorted((start.x, end.x))start.y, end.y = sorted((start.y, end.y))