Message271158
I did look at the code. Indeed list and tuple compare x to e, while dict, set, and frozenset (well, I didn't check each one, just list and set) compare the e to x, where e is they key stored at hash(x).
Steve has a good point about the iteration. And a user class can do anything it wants in contains. I wonder if it would be even more accurate to say "conceptually equal" rather than "approximately equal", given that hash table 'in' doesn't do iteration at all. |
|
Date |
User |
Action |
Args |
2016-07-24 14:42:30 | r.david.murray | set | recipients:
+ r.david.murray, rhettinger, steven.daprano, vfaronov |
2016-07-24 14:42:30 | r.david.murray | set | messageid: <1469371350.45.0.995109170647.issue27605@psf.upfronthosting.co.za> |
2016-07-24 14:42:30 | r.david.murray | link | issue27605 messages |
2016-07-24 14:42:30 | r.david.murray | create | |
|