def repr_type(obj):
    """ Return a string representation of a value and its type for readable
    error messages.
    """
    the_type = type(obj)
    msg = '%r %r' % (obj, the_type)
    return msg
