Simpler and more canonical hash#55
Conversation
|
This will change the hash of e.g. stored |
|
I'd argue that the only hash semantic is that
But the current implementation fails to meet even that (under a contrived scenario): Can you elaborate on what you mean about stored data? In python >3,3, |
|
The example indicates that setting I thought about cases where users e.g. pickle a dictionary with times as the key. But I guess this only affects the in-memory representation of the dict. Not the pickled data. @ros/ros_team Do you think it is safe to change the hash function here? Since even the new proposed hash would fail for the above example should we modify the access to the slots and always convert them to int to ensure a normalized representation? |
Not true, because in python |
|
@eric-wieser good point, that makes quite a difference. |
|
Since nobody else raised any concerns I moved forward and cherry-picked your patch to the kinetic-devel branch: b244f2f Thank you again. |
Marginally faster too