From: jansenh Date: 2006-12-17T06:00:05+09:00 Subject: Re: Dictionary, iterate & update objects oops! This one was actually meant to be posted in the PYTHON group ... :-( Sorry! regards, Henning jansenh wrote: > hi comp.lang.python. > > I need some newbe advice on idiomatic use of Python dictionaries. > > I have service with a dictionary which holds a bunch of objects as > values, and an ID as key to each object. Then I want to change an > objects state based on its key. The way I am doing this now is by using > 'fromkeys' and copying my object over in a temporary dictionary, then > manipulating the object, and then I do an 'update' back to the main > dictionary.. :-0 > > There has to be a smarter way? Thankful for any piece of > enlightenment... > > regards, Henning