Assumes checking for object equality before inserting. If they are they same, do we need different hashes?
Kind Regards, Abdur-Rahmaan Janhangeer about <https://compileralchemy.github.io/> | blog <https://www.pythonkitchen.com> github <https://github.com/Abdur-RahmaanJ> Mauritius On Thu, Apr 21, 2022 at 7:15 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > On 2022-04-21 at 06:22:53 +0400, > Abdur-Rahmaan Janhangeer <arj.pyt...@gmail.com> wrote: > > > Maybe hashes should point to an object rather than being the hash of an > > object themselves. > > Maybe the speed drop is not worth it. > > Then you have a different problem. > > x = [1, 2, 3] > y = [n for n in 1, 2, 3] > > Those two lists (x and y) are separate but equal objects. Being > separate, pointers to them would not be equal. Being equal, they have > to have the same hash. > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list