def diffdict(new, old, inexistent_value=None):
    """Returns the differences between two dictionaries.
In case of addition or deletion, old or new values are set to inexistent_value.

:param new: first dictionary to compare.
:param old: second dictionary to compare.
:param inexistent_value: value used as old or new value for deletion or addition, defaults to None.
:returns: a list of the differences between the two dictionaries, like: [(key, new_value, old_value),...]
"""
    changes = []
    for key, val in old.items():
        new_val = new.get(key, Ellipsis)
        if new_val is Ellipsis:
            changes.append((key, inexistent_value, val))
        elif new_val != val:
            changes.append((key, new_val, val))
    for key, val in new.items():
        old_val = old.get(key, Ellipsis)
        if old_val is Ellipsis:
            changes.append((key, val, inexistent_value))
    return changes
