GothenburgBitFactory / tasklib

A Python library for interacting with taskwarrior databases.
http://tasklib.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
146 stars 27 forks source link

Removes redundant definition #51

Closed nesaro closed 6 years ago

nesaro commented 6 years ago

__ne is already defined if \eq__ is defined

https://docs.python.org/3/reference/datamodel.html#object.__ne__

robgolding commented 6 years ago

This looks fine, thanks @nesaro! The tests are failing because Taskwarrior has been moved to GitHub.

tbabej commented 6 years ago

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.

nesaro commented 6 years ago

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 .