[Python-Dev] Retrieve an arbitrary element from a set without removing it

Guido van Rossum guido at python.org
Mon Oct 26 17:38:13 CET 2009

All this talk of equivalence classes makes me dizzy. :-)

- If sets were to grow an API to non-destructively access the object
stored in the set for a particular key, then dicts should have such a
method too.

- Ditto for an API to non-destructively get an arbitrary element.

- I'm far from convinced that we urgently need either API. But I'm
also not convinced it's unneeded.

- I still wish we could go back in time and unify sets and dicts, if
only to find out how that experiment would turn out.

--Guido van Rossum

PS. My elbow needs a couple more weeks of rest. Limiting myself to
ultra-short emails.

More information about the Python-Dev mailing list