> moreover, you can say a set is a "kind of" a keys-only dict. in fact,
> the first implementation of set used a dict, where the keys where the
> elements of the set, and their value was always True.

Or you could adopt the approach used by SETL: A dict is equivalent to a set
of 2-tuples.  In other words, {1:2, 3:4} could be defined as being
equivalent to {(1,2), (3,4)}, with the run-time system being responsible for
maintaining the information needed for efficient associative access.  Then
there's no question about the type of {}, because there's really only one
type.

No, I'm not serious; I think it would be too big a change.  But you have to
admit it's a cool idea :-)


_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to