def _type_pprint(obj, p, cycle):
 if ([m for m in _get_mro(type(obj)) if ('__repr__' in vars(m))][:1] != [type]):
  _repr_pprint(obj, p, cycle)
  return
 mod = _safe_getattr(obj, '__module__', None)
 try:
  name = obj.__qualname__
  if (not isinstance(name, str)):
   raise Exception('Try __name__')
 except Exception:
  name = obj.__name__
  if (not isinstance(name, str)):
   name = '<unknown type>'
 if (mod in (None, '__builtin__', 'builtins', 'exceptions')):
  p.text(name)
 else:
  p.text(((mod + '.') + name))

def _type_pprint ( obj , p , cycle ) : if ( [ m for m in _get_mro ( type ( obj ) ) if ( '__repr__' in vars ( m ) ) ] [ : 1 ] != [ type ] ) : _repr_pprint ( obj , p , cycle ) return mod = _safe_getattr ( obj , '__module__' , None ) try : name = obj . __qualname__ if ( not isinstance ( name , str ) ) : raise Exception ( 'Try __name__' ) except Exception : name = obj . __name__ if ( not isinstance ( name , str ) ) : name = '<unknown type>' if ( mod in ( None , '__builtin__' , 'builtins' , 'exceptions' ) ) : p . text ( name ) else : p . text ( ( ( mod + '.' ) + name ) )
the pprint for classes and types .