Closed MarkusH closed 11 years ago
Applications might want to sort a list of bvggrabber.api.Departure. We should simply implement the rich comparison methods.
bvggrabber.api.Departure
http://docs.python.org/3/reference/datamodel.html#object.__lt__ http://docs.python.org/3/reference/datamodel.html#object.__le__ http://docs.python.org/3/reference/datamodel.html#object.__eq__ http://docs.python.org/3/reference/datamodel.html#object.__ne__ http://docs.python.org/3/reference/datamodel.html#object.__gt__ http://docs.python.org/3/reference/datamodel.html#object.__ge__
For simplification we should consider using http://docs.python.org/3/library/functools.html#functools.total_ordering .
Applications might want to sort a list of
bvggrabber.api.Departure
. We should simply implement the rich comparison methods.http://docs.python.org/3/reference/datamodel.html#object.__lt__ http://docs.python.org/3/reference/datamodel.html#object.__le__ http://docs.python.org/3/reference/datamodel.html#object.__eq__ http://docs.python.org/3/reference/datamodel.html#object.__ne__ http://docs.python.org/3/reference/datamodel.html#object.__gt__ http://docs.python.org/3/reference/datamodel.html#object.__ge__
For simplification we should consider using http://docs.python.org/3/library/functools.html#functools.total_ordering .