On Wed, 24 Jul 2019 19:09:37 -0400 David Mertz <mertz@gnosis.cx> wrote:
There are various possible behaviors that might make sense, but having `d.values() != d.values()` is about the only one I can see no sense in.
Why? Does the following make no sense to you?
iter(()) == iter(()) False
Python deliberately allows you to compare everything with everything, at least for equality. Perhaps it shouldn't, but it's too late to design the language differently.
This feels similar to NumPy arrays, that also will not compare for equality in bare form.
They will, but then they return an array of booleans.
a = np.array([1,2]) b = np.array([1,3]) a == b array([ True, False])
Regards Antoine.