diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-15 12:11:37 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-15 12:11:37 +0100 |
commit | 135b4141389138d95ad2c1a83a6a706f9758ceb6 (patch) | |
tree | 130bce997d5d6562db51f940f186f427b1779ee6 /table.py | |
parent | 2575a944af5839cf1bbafbdfe7f7f55478020014 (diff) | |
download | logilab-common-135b4141389138d95ad2c1a83a6a706f9758ceb6.tar.gz |
2to3 has some more usable fixers
Diffstat (limited to 'table.py')
-rw-r--r-- | table.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -100,10 +100,9 @@ class Table(object): method should be in ('asc', 'desc') """ - sort_list = [(row[col_index], row, row_name) - for row, row_name in zip(self.data, self.row_names)] + sort_list = sorted([(row[col_index], row, row_name) + for row, row_name in zip(self.data, self.row_names)]) # Sorting sort_list will sort according to col_index - sort_list.sort() # If we want reverse sort, then reverse list if method.lower() == 'desc': sort_list.reverse() |