[Checkins] SVN: z3c.table/branches/lazyvalues2/src/z3c/table/table.py code hopefully easier to read
Godefroid Chapelle
gotcha at bubblenet.be
Thu Aug 5 05:43:24 EDT 2010
Log message for revision 115490:
code hopefully easier to read
Changed:
U z3c.table/branches/lazyvalues2/src/z3c/table/table.py
-=-
Modified: z3c.table/branches/lazyvalues2/src/z3c/table/table.py
===================================================================
--- z3c.table/branches/lazyvalues2/src/z3c/table/table.py 2010-08-05 09:05:55 UTC (rev 115489)
+++ z3c.table/branches/lazyvalues2/src/z3c/table/table.py 2010-08-05 09:43:24 UTC (rev 115490)
@@ -37,13 +37,17 @@
def getSortMethod(idx):
- def getSortKey(item):
- sublist = item[idx]
+ def getSortKey(row):
+ # a row is a list of tuples, one tuple for each column
+ # each tuple holds value, column, colspan
+ colTuple = row[idx]
- def getColumnSortKey(sublist):
- return sublist[1].getSortKey(sublist[0])
+ def getColumnSortKey(colTuple):
+ return colTuple[1].getSortKey(colTuple[0])
+ # IOW
+ # return column.getSortKey(row)
- return getColumnSortKey(sublist)
+ return getColumnSortKey(colTuple)
return getSortKey
More information about the checkins
mailing list