Guido van Rossum wrote:
On Sat, Oct 24, 2009 at 10:34 AM, Alexander Belopolsky
<[email protected]> wrote:
To me, however, a set seems to be a container that is a specialization
of a dict with values and keys being the same.

That's absurd; the mapping provides nothing useful.

Given Alexander's premise, I agree with your response. But his premise is wrong. Python's current builtin set class maps abstract equivalence classes to representative members. And this *is* useful. Mapping arbitrary members of such classes to representative members, sometimes called 'canonical', is a standard problem/goal in math. String interning is an application of this idea.

Terry Jan Reedy



_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to