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

2019年7月26日 05:01:18 -0700

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 good ways to express those:
 set(d1.values()) == set(d2.values())
 list(d1.values()) == list(d2.values())
--
Greg
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/OHF54Z54D2ERD4L4P72JCJQ5EB3LS5XZ/

Reply via email to