Comment 2 for bug 969928

Revision history for this message
Tomi Hukkalainen (tpievila) wrote :

Yeah, it is tricky... Which is greater, 29 days, or 1 month? I'm not sure if it makes sense to implement a partial solution, something that checks only days for example, as that can incorrectly imply that all cases are covered. In Python 3 when the comparisons are not implemented, the operation raises an exception. I'm inclined to just put magic functions that also raise NotImplemented, so that the functionality is equal.

In any case if/when a sensible solution is found, it needs to be implemented with rich comparisons, not with __cmp__ (it's not supported in Python 3).