9 Jan
2004
9 Jan
'04
8:33 a.m.
Paul Winkler wrote:
for i in self.objectItems('Folder').sort(i[0])
values = self.objectItems('Folder') values.sort(lambda a,b: cmp(a[0],b[0]) for i in values: # do stuff pass
This works fine.
sort() is lexicographic by default, which means it already sorts on the first element just fine :-) No comparison function needed in this case.
I was try before: ids = self.objectIds('Folder') ids = ids.sort() for i in ids : TypeError: object of type 'string' is not callable Regards, JL.