def __add__(self, other):
if isinstance(other, numbers.Number):<EOL><INDENT>return self.__class__(self._variables, self._offset + other)<EOL><DEDENT>elif isinstance(other, Variable):<EOL><INDENT>return self + Expression({other: <NUM_LIT:1>})<EOL><DEDENT>elif isinstance(other, Expression):<EOL><INDENT>variables = Counter(self._variables)<EOL>variables.update(other._variables)<EOL>variables = {var: value for var, value in iteritems(variables)<EOL>if value != <NUM_LIT:0>}<EOL>return self.__class__(variables, self._offset + other._offset)<EOL><DEDENT>return NotImplemented<EOL>
Add expressions, variables or numbers