def __init__(self, *args):
if len(args) == <NUM_LIT:1> and isinstance(args[<NUM_LIT:0>], string_types):<EOL><INDENT>self._variables, self._offset = self._parse_string(args[<NUM_LIT:0>])<EOL><DEDENT>elif len(args) <= <NUM_LIT:2>:<EOL><INDENT>self._variables = {}<EOL>self._offset = args[<NUM_LIT:1>] if len(args) >= <NUM_LIT:2> else <NUM_LIT:0><EOL>variables = args[<NUM_LIT:0>] if len(args) >= <NUM_LIT:1> else {}<EOL>for var, value in iteritems(variables):<EOL><INDENT>if not isinstance(var, Variable):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(var))<EOL><DEDENT>if value != <NUM_LIT:0>:<EOL><INDENT>self._variables[var] = value<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>
Create new expression

        >>> Expression({ Variable('x'): 2 }, 3)
        Expression('2x + 3')
        >>> Expression({ Variable('x'): 1, Variable('y'): 1 })
        Expression('x + y')