#NEWLINE# def trim_right_of_sel( self , * args ) : #NEWLINE# #INDENT# 'Cut list items with indices in sorted_keys that are greater than\n        the index of the last selected item if there is a selection.\n        ' #NEWLINE# if ( len ( self . selection ) > 0 ) : #NEWLINE# #INDENT# last_sel_index = max ( [ sel . index for sel in self . selection ] ) #NEWLINE# print ( 'last_sel_index' , last_sel_index ) #NEWLINE# self . data = sel . data [ : ( last_sel_index + 1 ) ]