LoopyKeyBuilder: improve BasicSet handling#913
Conversation
| # Equality | ||
| assert a == b | ||
| assert a.is_equal(b) | ||
| assert not a.plain_is_equal(b) | ||
|
|
||
| # Hashing | ||
| assert hash(a) != hash(b) | ||
| assert a.get_hash() != b.get_hash() | ||
| assert LoopyKeyBuilder()(a) == LoopyKeyBuilder()(b) |
There was a problem hiding this comment.
This behavior is pretty 💩-tastic. I'm not super interested in codifying it with a test.
If I could snap my finger and have a solution enacted globally, probably I would like ==, plain_is_equal and __hash__ to all share a notion of equality. Something for namedisl to aspire to.
There was a problem hiding this comment.
Aside from the test, would you still be interested in changing the way the hash is calculated, as in this PR?
There was a problem hiding this comment.
I think namedisl is the only reasonable path forward. I don't know that I'd like to mess with the status quo too much until that time, unless there is a pressing reason. Is there one, in the context of this PR?
There was a problem hiding this comment.
I don't think there is a pressing need for this PR. The goal was to enable running the tests with LOOPY_ABORT_ON_CACHE_MISS (#828).
This is (very) crude, not sure if a viable direction.
Fixes #912.
TODO:
Map