[Tutor] dictionary entries within dictionary

Paul Tremblay phthenry@earthlink.net
Mon Apr 7 20:59:01 2003


I can't figure out how to set up and access dictionaries within
dictionaries.

I set up my dictionary as follows:

self.__styles_dict =  {'para': {0:{}}, 'char':{0:{}}}

Then try to add a value to this dictionary:

self.__styles_dict[self.__type_of_style][self.__styles_num][att] = value

I get an error message that key 15 cannot be found. In other words, I
can't add a value to the inside entry of the dictionary.

How do I do this?

Thanks

Paul

-- 

************************
*Paul Tremblay         *
*phthenry@earthlink.net*
************************