'A binding is consistent with the dict if its variable is not already bound, OR if its
variable is already bound to its argument.
:param variable: ``VariableExpression`` The variable bind
:param binding: ``Expression`` The expression to which \'variable\' should be bound
:raise VariableBindingException: If the variable cannot be bound in this dictionary'

def __setitem__(self, variable, binding):

    assert isinstance(variable, VariableExpression)
    assert isinstance(binding, Expression)
    assert (variable != binding)
    existing = self.d.get(variable, None)
    if ((not existing) or (binding == existing)):
        self.d[variable] = binding
    else:
        raise VariableBindingException((u'Variable    %s    already    bound    to    another    value' % variable))
