[Python-ideas] Dictionary views are not entirely 'set like'

Random832 random832 at fastmail.com
Wed Apr 6 14:50:54 EDT 2016

On Wed, Apr 6, 2016, at 13:25, Joshua Morton wrote:
> In the prior discussion, guido also seemed open to making values
> equivalent
> on dictionary identity equality (#10), which I think makes more sense
> than
> current behavior and doesn't suffer performance issues. In any case, I
> would consider that a secondary concern.

You could probably handle a lot of common cases by:

- Eliminating any items which are present in both collections by
- Attempting to sort the lists of remaining items.

But, yeah, the way to do it in O(N) requires an "ephemeral hash"
operation which Python doesn't have and can't grow _now_, no matter what
the justification for not always having had it. That he won't change it
even after he builds the time machine doesn't really mean anything when
it comes down to it.

More information about the Python-ideas mailing list