def get_repr(expr, multiline=False):
signature = _get_object_signature(expr)<EOL>if signature is None:<EOL><INDENT>return "<STR_LIT>".format(type(expr).__name__)<EOL><DEDENT>defaults = {}<EOL>for name, parameter in signature.parameters.items():<EOL><INDENT>if parameter.default is not inspect._empty:<EOL><INDENT>defaults[name] = parameter.default<EOL><DEDENT><DEDENT>args, var_args, kwargs = get_vars(expr)<EOL>args_parts = collections.OrderedDict()<EOL>var_args_parts = []<EOL>kwargs_parts = {}<EOL>has_lines = multiline<EOL>parts = []<EOL>for i, (key, value) in enumerate(args.items()):<EOL><INDENT>arg_repr = _dispatch_formatting(value)<EOL>if "<STR_LIT:\n>" in arg_repr:<EOL><INDENT>has_lines = True<EOL><DEDENT>args_parts[key] = arg_repr<EOL><DEDENT>for arg in var_args:<EOL><INDENT>arg_repr = _dispatch_formatting(arg)<EOL>if "<STR_LIT:\n>" in arg_repr:<EOL><INDENT>has_lines = True<EOL><DEDENT>var_args_parts.append(arg_repr)<EOL><DEDENT>for key, value in sorted(kwargs.items()):<EOL><INDENT>if key in defaults and value == defaults[key]:<EOL><INDENT>continue<EOL><DEDENT>value = _dispatch_formatting(value)<EOL>arg_repr = "<STR_LIT>".format(key, value)<EOL>has_lines = True<EOL>kwargs_parts[key] = arg_repr<EOL><DEDENT>for _, part in args_parts.items():<EOL><INDENT>parts.append(part)<EOL><DEDENT>parts.extend(var_args_parts)<EOL>for _, part in sorted(kwargs_parts.items()):<EOL><INDENT>parts.append(part)<EOL><DEDENT>if has_lines and parts:<EOL><INDENT>for i, part in enumerate(parts):<EOL><INDENT>parts[i] = "<STR_LIT:\n>".join("<STR_LIT:U+0020>" + line for line in part.split("<STR_LIT:\n>"))<EOL><DEDENT>parts.append("<STR_LIT>")<EOL>parts = "<STR_LIT>".join(parts)<EOL>return "<STR_LIT>".format(type(expr).__name__, parts)<EOL><DEDENT>parts = "<STR_LIT:U+002CU+0020>".join(parts)<EOL>return "<STR_LIT>".format(type(expr).__name__, parts)<EOL>
Build a repr string for ``expr`` from its vars and signature.

::

    >>> class MyObject:
    ...     def __init__(self, arg1, arg2, *var_args, foo=None, bar=None, **kwargs):
    ...         self.arg1 = arg1
    ...         self.arg2 = arg2
    ...         self.var_args = var_args
    ...         self.foo = foo
    ...         self.bar = bar
    ...         self.kwargs = kwargs
    ...
    >>> my_object = MyObject('a', 'b', 'c', 'd', foo='x', quux=['y', 'z'])

::

    >>> import uqbar
    >>> print(uqbar.objects.get_repr(my_object))
    MyObject(
        'a',
        'b',
        'c',
        'd',
        foo='x',
        quux=['y', 'z'],
        )