def object_type_repr(obj):
    """Returns the name of the object's type.  For some recognized
    singletons the name of the object is returned instead. (For
    example for `None` and `Ellipsis`).
    """
    if obj is None:
        return 'None'
    elif obj is Ellipsis:
        return 'Ellipsis'
    cls = type(obj)
    if cls.__module__ in ('__builtin__', 'builtins'):
        name = cls.__name__
    else:
        name = cls.__module__ + '.' + cls.__name__
    return '%s object' % name
