#NEWLINE# def __setitem__( self , key , value ) : #NEWLINE# #INDENT# if ( self . _nailcount > 0 ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# cache = entries_to_remove . _cache #NEWLINE# if ( len ( cache ) > self . maxentries ) : #NEWLINE# #INDENT# entries_to_remove = max ( ( self . maxentries // 10 ) , 1 ) #NEWLINE# for k in list ( cache . keys ( ) ) [ : entries_to_remove ] : #NEWLINE# #INDENT# del cache [ k ] #NEWLINE# #UNINDENT# #UNINDENT# cache [ key ] = value