Use functools.total_ordering to provide rich Subtitle comparisons
Use functools.total_ordering to provide rich Subtitle comparisons

We cannot decorate Subtitle itself with total_ordering because
namedtuple already provides rich comparison methods, and total_ordering
will not override them. As such, one way to get around this without
having to declare every single rich comparison method is to implement a
class that only contains the base comparison methods, decorate it with
total_ordering, and then use multiple inheritance to override
namedtuple's rich comparison methods.

See my question about forcing total_ordering on Code Review Stack
Exchange for background:
http://codereview.stackexchange.com/q/81940/8558

cdown/srt