Re: nested dictionary assignment goes too far

2006-06-26 Thread Jake Emerson
Thanks a lot Serge and Ben. Your posts were right on. I hope the weather is good wherever you are. Jake -- http://mail.python.org/mailman/listinfo/python-list

Re: nested dictionary assignment goes too far

2006-06-26 Thread Ben Cartwright
Jake Emerson wrote: > However, when > the process goes to insert the unique 'char_freq' into a nested > dictionary the value gets put into ALL of the sub-keys The way you're currently defining your dict: rain_raw_dict = dict.fromkeys(distinctID,{'N':-6999,'char_freq':-6999,...}) Is shorthand fo

Re: nested dictionary assignment goes too far

2006-06-26 Thread Serge Orlov
On 26 Jun 2006 16:56:22 -0700, Jake Emerson <[EMAIL PROTECTED]> wrote: > I'm attempting to build a process that helps me to evaluate the > performance of weather stations. The script below operates on an MS > Access database, brings back some data, and then loops through to pull > out statistics. O

nested dictionary assignment goes too far

2006-06-26 Thread Jake Emerson
I'm attempting to build a process that helps me to evaluate the performance of weather stations. The script below operates on an MS Access database, brings back some data, and then loops through to pull out statistics. One such stat is the frequency of reports from the stations ('char_freq'). I hav