#NEWLINE# def __setitem__( self , key , value ) : #NEWLINE# #INDENT# evicted_value = _Null #NEWLINE# with self . lock : #NEWLINE# #INDENT# evicted_value = self . _container . get ( key , _Null ) #NEWLINE# self . _container [ key ] = value #NEWLINE# if ( len ( self . _container ) > self . _maxsize ) : #NEWLINE# #INDENT# ( _key , evicted_value ) = self . _container . popitem ( last = False ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . dispose_func and ( evicted_value is not _Null ) ) : #NEWLINE# #INDENT# self . dispose_func ( evicted_value )