dict order

cokofreedom at gmail.com cokofreedom at gmail.com
Wed Jun 18 17:23:20 CEST 2008


On Jun 18, 4:45 pm, Kirk Strauser <k... at daycos.com> wrote:
> At 2008-06-18T10:32:48Z, cokofree... at gmail.com writes:
> > # untested 2.5
> > for keys in dict_one.items():
> >   if keys in dict_two:
> >     if dict_one[keys] != dict_two[keys]:
> >       # values are different
> >   else:
> >     # key is not present
>
> That fails if there is an item in dict_two that's not in dict_one.
> --
> Kirk Strauser
> The Day Companies

True :)



More information about the Python-list mailing list