def type_name(value):
 if inspect.isclass(value):
  cls = value
 else:
  cls = value.__class__
 if (cls.__module__ in set([u'builtins', u'__builtin__'])):
  return cls.__name__
 return (u'%s.%s' % (cls.__module__, cls.__name__))

def type_name ( value ) : if inspect . isclass ( value ) : cls = value else : cls = value . __class__ if ( cls . __module__ in set ( [ u'builtins' , u'__builtin__' ] ) ) : return cls . __name__ return ( u'%s.%s' % ( cls . __module__ , cls . __name__ ) )
returns a user-readable name for the type of an object .