(self, i, y)
x.__setitem__(i, y) <==> x[i] = y

        Modify the data in the event object requested by "x".
        If i is an int, the ith requested argument from self.args
        shall be changed to y. If i is a str, the requested value
        keyed by i from self.kwargs, shall by changed to y.
        Otherwise a TypeError is raised as nothing else is valid.
x.__setitem__(i, y) <==> x[i] = y
x . __setitem__ ( i y ) < == > x [ i ] = y
def __setitem__(self, i, y):
        """x.__setitem__(i, y) <==> x[i] = y

        Modify the data in the event object requested by "x".
        If i is an int, the ith requested argument from self.args
        shall be changed to y. If i is a str, the requested value
        keyed by i from self.kwargs, shall by changed to y.
        Otherwise a TypeError is raised as nothing else is valid.
        """

        if isinstance(i, int):
            self.args[i] = y
        elif isinstance(i, str):
            self.kwargs[i] = y
        else:
            raise TypeError("Expected int or str, got %r" % type(i))
def __setitem__ ( self , i , y ) : if isinstance ( i , int ) : self . args [ i ] = y elif isinstance ( i , str ) : self . kwargs [ i ] = y else : raise TypeError ( "Expected int or str, got %r" % type ( i ) )