#NEWLINE# def _insert( self , key , value ) : #NEWLINE# #INDENT# flat_key = self . _serialize_key ( key ) #NEWLINE# i = self . _index . get ( flat_key , ( - 1 ) ) #NEWLINE# if ( i >= 0 ) : #NEWLINE# #INDENT# self . _items [ i ] = ( key , value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _items . append ( ( key , value ) ) #NEWLINE# self . _index [ flat_key ] = ( len ( self . _items ) - 1 )