Re: [sage-devel] Re: containment in a set different from containment in a set - help needed

2022-12-11 Thread 'Martin R' via sage-devel
Help needed again. I removed the (seemingly) useless overrides, but now SetPartition and DecoratedPermutation isn't hashable anymore. Curiously, ParkingFunction is, and I don't see the difference. On Saturday, 10 December 2022 at 23:45:41 UTC+1 Martin R wrote: > https://trac.sagemath.org/tick

Re: [sage-devel] Re: containment in a set different from containment in a set - help needed

2022-12-11 Thread Nils Bruin
Once again: https://docs.python.org/3/reference/datamodel.html#object.__hash __eq__ and __hash__ are tied ad the hip: overriding one prevents inheritance of the other. Python takes its contract "equality must imply identical hashes" a little more seriously than sage, so Python doesn't allow th