def GetTypeChecker(field):
 if ((field.cpp_type == _FieldDescriptor.CPPTYPE_STRING) and (field.type == _FieldDescriptor.TYPE_STRING)):
  return UnicodeValueChecker()
 if (field.cpp_type == _FieldDescriptor.CPPTYPE_ENUM):
  return EnumValueChecker(field.enum_type)
 return _VALUE_CHECKERS[field.cpp_type]

def GetTypeChecker ( field ) : if ( ( field . cpp_type == _FieldDescriptor . CPPTYPE_STRING ) and ( field . type == _FieldDescriptor . TYPE_STRING ) ) : return UnicodeValueChecker ( ) if ( field . cpp_type == _FieldDescriptor . CPPTYPE_ENUM ) : return EnumValueChecker ( field . enum_type ) return _VALUE_CHECKERS [ field . cpp_type ]
returns a type checker for a message field of the specified types .