[Python-Dev] Re: Fwd: Re: Comparing dict.values()

2019-07-26 Thread David Mertz
Yep! That's exactly my feeling too. Maybe add these to the "reasonable" comparisons: sorted(d1.values()) == sorted(d2.values()) Counter(d1.values()) == Counter(d2.values()) But generally everything I might want to compare about values has a straightforward spelling already. On Fri, Jul 26, 2019

[Python-Dev] Re: Fwd: Re: Comparing dict.values()

2019-07-26 Thread Greg Ewing
David Mertz wrote: We COULD do that with `d1.values() == d2.values()` in principle. This "DictValuesComparison" object could have methods like `.equal_as_set()` and `.equal_as_list()`. However, that's a lot of machinery for very little gain. Particularly as there are already perfectly go