Closed nesaro closed 6 years ago
This looks fine, thanks @nesaro! The tests are failing because Taskwarrior has been moved to GitHub.
This, however, does not work under Python 2, https://docs.python.org/2/reference/datamodel.html#object.__ne__ says:
There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining
__eq__()
, one should also define__ne__()
so that the operators will behave as expected.
Since we support Python 2 as well as Python 3, this commit should be reverted.
That's fair enough, thanks for checking it up!
On 21 February 2018 at 11:14, Tomas Babej notifications@github.com wrote:
This, however, does not work under Python 2, https://docs.python.org/2/ reference/datamodel.html#object.ne says:
There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining eq(), one should also define ne() so that the operators will behave as expected.
Since we support Python 2 as well as Python 3, this commit should be reverted.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robgolding/tasklib/pull/51#issuecomment-367294154, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEXJAqoaEnySubZIrbqI8PQ37wBnKvMks5tW_qugaJpZM4SMFhr .
__ne is already defined if \eq__ is defined
https://docs.python.org/3/reference/datamodel.html#object.__ne__