#NEWLINE# def __setitem__( self , index , sub ) : #NEWLINE# #INDENT# if ( index < 0 ) : #NEWLINE# #INDENT# index += len ( index . data ) #NEWLINE# #UNINDENT# if ( ( index < 0 ) or ( index >= len ( self . data ) ) ) : #NEWLINE# #INDENT# raise IndexError #NEWLINE# #UNINDENT# self . data = ( ( self . data [ : index ] + sub ) + self . data [ ( index + 1 ) : ] )