#NEWLINE# def trim_end( self , end ) : #NEWLINE# #INDENT# 'Trim lines from the bottom of the canvas.\n        \n        end -- number of lines to remove from the end\n        ' #NEWLINE# assert ( end > 0 ) , ( 'invalid trim amount %d!' % end ) #NEWLINE# assert ( end <= self . rows ( ) ) , ( 'cannot trim %d lines from %d!' % ( end , self . rows ( ) ) ) #NEWLINE# if self . widget_info : #NEWLINE# #INDENT# raise self . _finalized_error #NEWLINE# #UNINDENT# self . shards = shards_trim_rows ( self . shards , ( self . rows ( ) - end ) )