def rename(dct, old_name, new_name):
    """
        Rename a key in a dictionary. No effect if the key does not exists.

        Return the dictiony passed as parameter.
    """
    try:
        dct[new_name] = dct[old_name]
        del dct[old_name]
    except KeyError:
        pass
    return dct
