@typeof_impl.register(type)
def typeof_type(val, c):
 if issubclass(val, BaseException):
  return types.ExceptionClass(val)
 if (issubclass(val, tuple) and hasattr(val, '_asdict')):
  return types.NamedTupleClass(val)

@ typeof_impl . register ( type ) def typeof_type ( val , c ) : if issubclass ( val , BaseException ) : return types . ExceptionClass ( val ) if ( issubclass ( val , tuple ) and hasattr ( val , '_asdict' ) ) : return types . NamedTupleClass ( val )
type various specific python types .