Test/bin/Classess/Track.py
2021-05-24 16:43:07 +02:00

18 lines
429 B
Python

class Track:
def __init__(self, priority, road):
self.priority = priority
self.road = road
def __eq__(self, other):
try:
return self.priority == other.priority
except AttributeError:
return NotImplemented
def __lt__(self, other):
try:
return self.priority < other.priority
except AttributeError:
return NotImplemented