#NEWLINE# def setSort( self , index ) : #NEWLINE# #INDENT# if ( index . sort == None ) : #NEWLINE# #INDENT# self . sort = [ index , 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . sort [ 0 ] == index ) : #NEWLINE# #INDENT# self . sort [ 1 ] = ( - self . sort [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . sort = [ index , 1 ] #NEWLINE# #UNINDENT# #UNINDENT# self . _sort ( )