[Python-3000] PEP 3106: Revamping dict.keys(), .values() and .items()

Guido van Rossum guido at python.org
Sun Dec 24 02:17:52 CET 2006


On 12/23/06, Tony Lownds <tony at pagedna.com> wrote:
>
> On Dec 22, 2006, at 9:49 PM, Guido van Rossum wrote:
> > - Talin asked for values to be list-like ... I really don't want
> > them to be list-like since that implies an ordering
>
> Will iter(keys()) and iter(values()) have the same relative order, as
> they do
> today?
>
> Ie, d == dict(zip(d.keys(), d.values()))

Yes. This is implied by the implementation shown in the PEP, which
derives all iterations from the iteration over the dict. I'll make it
explicit though.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list