David Mertz wrote:
This feels similar to NumPy arrays, that also will not compare for equality in bare form.
Not quite the same -- comparing numpy arrays doesn't raise an exception, it returns an array of booleans. What raises an exception is trying to use the resulting array in a boolean context. But it is an example of something raising an exception that one would normally expect to always succeed. In the case of dict.values() == dict.values(), raising an exception is probably the least bad thing. Yes, it can lead to code blowing up unexpectedly, but I think it's better than having code appear to work while doing something subtly different from what you wanted. -- 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/723CHZBH4ZBKQJOOPXFFX3HYSPDBPDPR/
