[Python-Dev] Re: PEP 218 (sets); moving set.py to Lib

Tim Peters tim.one@comcast.net
Mon, 19 Aug 2002 12:36:09 -0400


>From the Library Reference manual, section "Mapping Types":

    Keys and values are listed in random order.  If keys() and values()
    are called with no intervening modifications to the dictionary,
    the two lists will directly correspond.  This allows the creation of
    (value, key) pairs using zip(): "pairs = zip(a.values(), a.keys())".

The same footnote should be reworked to cover, and be referened from, the
.iter{keys, value, items} methods too.