parameters: (self, extension_handle, value)
docstring: If extension_handle specifies a non-repeated, scalar extension
      field, sets the value of that field.
docstring_summary: If extension_handle specifies a non-repeated, scalar extension
      field, sets the value of that field.
docstring_tokens: If extension_handle specifies a non - repeated scalar extension field sets the value of that field .
function: def __setitem__(self, extension_handle, value):
      """If extension_handle specifies a non-repeated, scalar extension
      field, sets the value of that field.
      """
  
      _VerifyExtensionHandle(self._extended_message, extension_handle)
  
      if (extension_handle.label == _FieldDescriptor.LABEL_REPEATED or
          extension_handle.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE):
        raise TypeError(
            'Cannot assign to extension "%s" because it is a repeated or '
            'composite type.' % extension_handle.full_name)
  
      # It's slightly wasteful to lookup the type checker each time,
      # but we expect this to be a vanishingly uncommon case anyway.
      type_checker = type_checkers.GetTypeChecker(
          extension_handle.cpp_type, extension_handle.type)
      type_checker.CheckValue(value)
      self._extended_message._fields[extension_handle] = value
      self._extended_message._Modified()
function_tokens: def __setitem__ ( self , extension_handle , value ) : _VerifyExtensionHandle ( self . _extended_message , extension_handle ) if ( extension_handle . label == _FieldDescriptor . LABEL_REPEATED or extension_handle . cpp_type == _FieldDescriptor . CPPTYPE_MESSAGE ) : raise TypeError ( 'Cannot assign to extension "%s" because it is a repeated or ' 'composite type.' % extension_handle . full_name ) # It's slightly wasteful to lookup the type checker each time, # but we expect this to be a vanishingly uncommon case anyway. type_checker = type_checkers . GetTypeChecker ( extension_handle . cpp_type , extension_handle . type ) type_checker . CheckValue ( value ) self . _extended_message . _fields [ extension_handle ] = value self . _extended_message . _Modified ( )