July 24, 2019
4:42 p.m.
On Tue, 23 Jul 2019 23:44:35 +0100 MRAB <python@mrabarnett.plus.com> wrote:
However, when comparing the values you have a problem: you have 2 collections of objects that might contain duplicates, might not be hashable, and might not be sortable, so comparing them could be inefficient, and you can't refer back to their keys like in the case of comparing the items as above because the 2 dicts might have different keys. Unless someone can come up with an efficient solution, I'd probably go with raising an exception.
Equality comparisons should never raise. Regards Antoine.