parameters: (self, key, value)
docstring: Setting tag[key] sets the value of the 'key' attribute for the
          tag.
docstring_summary: Setting tag[key] sets the value of the 'key' attribute for the
          tag.
docstring_tokens: Setting tag [ key ] sets the value of the key attribute for the tag .
function: def __setitem__(self, key, value):
          """Setting tag[key] sets the value of the 'key' attribute for the
          tag."""
          self._getAttrMap()
          self.attrMap[key] = value
          found = False
          for i in range(0, len(self.attrs)):
              if self.attrs[i][0] == key:
                  self.attrs[i] = (key, value)
                  found = True
          if not found:
              self.attrs.append((key, value))
          self._getAttrMap()[key] = value
function_tokens: def __setitem__ ( self , key , value ) : self . _getAttrMap ( ) self . attrMap [ key ] = value found = False for i in range ( 0 , len ( self . attrs ) ) : if self . attrs [ i ] [ 0 ] == key : self . attrs [ i ] = ( key , value ) found = True if not found : self . attrs . append ( ( key , value ) ) self . _getAttrMap ( ) [ key ] = value