>>>>> "Paddy" <[EMAIL PROTECTED]> (P) wrote:
>P> [EMAIL PROTECTED] wrote: >>> This has been bothering me for a while. Just want to find out if it >>> just me or perhaps others have thought of this too: Why shouldn't the >>> keyset of a dictionary be represented as a set instead of a list? >P> I think the order of the items returned by keys() and values() are >P> related. I decided on a short empirical test: yes, it is documented that their order is related. In fact d.items() == zip(d.keys(), d.values()) This wouldn't work with sets instead of lists. -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list