Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing behaviour of equality operator. #23

Open
nsbgn opened this issue Apr 29, 2021 · 3 comments
Open

Confusing behaviour of equality operator. #23

nsbgn opened this issue Apr 29, 2021 · 3 comments

Comments

@nsbgn
Copy link
Contributor

nsbgn commented Apr 29, 2021

As it is, the equality operator can hold that v == o is false but o == v is true, if o is a type operation and v is a variable that is bound to o. This is confusing.

@nsbgn
Copy link
Contributor Author

nsbgn commented Apr 29, 2021

We should probably rename unifiable to match and remove the custom equality operator to alleviate this.

@nsbgn
Copy link
Contributor Author

nsbgn commented Sep 4, 2021

The above was done in 96a948a.

@nsbgn
Copy link
Contributor Author

nsbgn commented Oct 27, 2021

Note also that __hash__, introduced in db95ab8, violates the principle that x == y implies hash(x) == hash(y), for the same reason. The main reason I haven't removed it yet is that is that equality is often used in testing. Should define an .assertMatch() instead of using .assertEqual().

@nsbgn nsbgn added this to the Version 0.2: RDF support milestone Oct 27, 2021
@nsbgn nsbgn removed this from the Version 0.2: RDF support milestone Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant