21 Jan
2004
21 Jan
'04
6:08 a.m.
Hi Tim, Tim Zegir wrote:
Hi all,
I have 2 sqlmethods foo and bar
then i have a python script
----------------------- x=int(myx) mylist=[]
for result in context.foo: mylist.append(result) if x == 2: for result in context.bar: mylist.append(result) return mylist -----------------------
what i want to do is sort this list by a field eg. mylist.sort('fieldname') but obviously the sort function dose not work like that
as andreas says -> consult python documentation and/or zope book on sequence.sort() Otoh, why dont you join (union) the data in the database and also sort there? Regards Tino