Re: compare dictionary values

2006-01-03 Thread Tim Williams (gmail)
On 30/12/05, rbt <[EMAIL PROTECTED]> wrote: What's a good way to compare values in dictionaries? I want to find[snip]My key-values pairs are filepaths and their modify times. I want toidentify files that have been updated or added since the script last ran. You don't need to store each file's upda

Re: compare dictionary values

2005-12-30 Thread Tim Williams (gmail)
In <[EMAIL PROTECTED]>, rbt wrote: > What's a good way to compare values in dictionaries? Do you need to compare dictionaries, if its an option it would be simpler/cheaperĀ  to compareĀ  each entry from your file listing with entries in a single dict and act accordingly, mainly because you will alrea

Re: compare dictionary values

2005-12-30 Thread rbt
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, rbt wrote: > >> What's a good way to compare values in dictionaries? > > Look them up and then compare!? ;-) > >> I want to find >> values that have changed. I look for new keys by doing this: >> >> new = [k for k in file_info_cur.iterk

Re: compare dictionary values

2005-12-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, rbt wrote: > What's a good way to compare values in dictionaries? Look them up and then compare!? ;-) > I want to find > values that have changed. I look for new keys by doing this: > > new = [k for k in file_info_cur.iterkeys() if k not in > file_info_old.iterkeys()]