'Change the messages that correspond to certain keys.'

def update(self, arg=None):

    if hasattr(arg, 'iteritems'):
        source = arg.iteritems()
    elif hasattr(arg, 'items'):
        source = arg.items()
    else:
        source = arg
    bad_key = False
    for (key, message) in source:
        try:
            self[key] = message
        except KeyError:
            bad_key = True
    if bad_key:
        raise KeyError('No    message    with    key(s)')
