def type_name(value):
    """return pretty-printed string containing name of value's type"""
    cls = value.__class__
    if cls.__module__ and cls.__module__ not in ['__builtin__', 'builtins']:
        return '%s.%s' % (cls.__module__, cls.__name__)
    elif value is None:
        return 'None'
    else:
        return cls.__name__
