Exemplo n.º 1
0
 def sort(self, tags):
     if not isinstance(tags, tuple):
         tags = (tags, )
     self.mapitable.SortTable(
         SSortOrderSet([
             SSort(abs(tag),
                   TABLE_SORT_DESCEND if tag < 0 else TABLE_SORT_ASCEND)
             for tag in tags
         ], 0, 0), 0)
Exemplo n.º 2
0
    def sort(self, tags):
        """Sort table.

        :param tags: Tag(s) on which to sort.
        """
        if not isinstance(tags, tuple):
            tags = (tags,)

        ascend_descend = [SSort(abs(tag),
            TABLE_SORT_DESCEND if tag < 0 else TABLE_SORT_ASCEND)
                for tag in tags]

        self.mapitable.SortTable(SSortOrderSet(ascend_descend, 0, 0), 0)