Use defaultdict, this will allow you to specify a default value for keys which don't exist in the dictionary. For example:
>>> from collections import defaultdict
>>> d = defaultdict(lambda: 'UNKNOWN')
>>> d.update({'greetings': 'hello'})
>>> '%(greetings)s %(name)s !!!' % d
'hello UNKNOWN !!!'
>>>