nodes: 0, module; 1, function_definition; 2, function_name:resort; 3, parameters; 4, block; 5, identifier:self; 6, identifier:columnName; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, if_statement; 12, return_statement; 13, comment:"""
          Re-sort the table.
  
          @param columnName: the name of the column to sort by.  This is a string
          because it is passed from the browser.
          """; 14, assignment; 15, assignment; 16, comparison_operator:newSortColumn is None; 17, block; 18, comparison_operator:csc is newSortColumn; 19, block; 20, else_clause; 21, attribute; 22, identifier:csc; 23, attribute; 24, identifier:newSortColumn; 25, subscript; 26, identifier:newSortColumn; 27, None; 28, raise_statement; 29, identifier:csc; 30, identifier:newSortColumn; 31, expression_statement; 32, block; 33, identifier:self; 34, identifier:isAscending; 35, identifier:self; 36, identifier:currentSortColumn; 37, attribute; 38, identifier:columnName; 39, call; 40, assignment; 41, expression_statement; 42, expression_statement; 43, identifier:self; 44, identifier:columns; 45, identifier:Unsortable; 46, argument_list; 47, attribute; 48, not_operator; 49, assignment; 50, assignment; 51, binary_operator:'column %r has no sort attribute' % (columnName,); 52, identifier:self; 53, identifier:isAscending; 54, attribute; 55, attribute; 56, identifier:newSortColumn; 57, attribute; 58, True; 59, string; 60, tuple; 61, identifier:self; 62, identifier:isAscending; 63, identifier:self; 64, identifier:currentSortColumn; 65, identifier:self; 66, identifier:isAscending; 67, string_content:column %r has no sort attribute; 68, identifier:columnName
code: def resort(self, columnName):
          """
          Re-sort the table.
  
          @param columnName: the name of the column to sort by.  This is a string
          because it is passed from the browser.
          """
          csc = self.currentSortColumn
          newSortColumn = self.columns[columnName]
          if newSortColumn is None:
              raise Unsortable('column %r has no sort attribute' % (columnName,))
          if csc is newSortColumn:
              self.isAscending = not self.isAscending
          else:
              self.currentSortColumn = newSortColumn
              self.isAscending = True
          return self.isAscending