[Python-Dev] Compact ordered set

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Feb 28 16:30:14 EST 2019


Antoine Pitrou wrote:

> On a more abstract level, set and dict are both content-addressed
> collections parametered on hash and equality functions.

Indeed. It's been said that a set is like "half a dict", and
this is why sets were implemented using dicts in the old days.
It's kind of an obvious thing to do.

You can argue about how far the analogy should be taken, but
you can't blame people for noticing the similarity.

-- 
Greg


More information about the Python-Dev mailing list