code: def resort(self, attributeID, isAscending=None):
          if isAscending is None:
              isAscending = self.defaultSortAscending
          newSortColumn = self.columns[attributeID]
          if newSortColumn.sortAttribute() is None:
              raise Unsortable('column %r has no sort attribute' % (attributeID,))
          if self.currentSortColumn == newSortColumn:
              if self.isAscending == isAscending:
                  offset = 0
              else:
                  offset = -1
          else:
              offset = 0
              self.currentSortColumn = newSortColumn
          self.isAscending = isAscending
          self._updateResults(self._sortAttributeValue(offset), True)