[Zope] Sorting objectValues in Python Script

Jerome Alet alet@librelogiciel.com
Fri, 18 Oct 2002 10:20:27 +0200


On Fri, Oct 18, 2002 at 10:15:10AM +0200, Andreas Tille wrote:
> Hello,
> 
> I just want to build a sorted list of
> 
>    list = context.objectValues('ExtFile')
>    for file in list:
>         print file.id, file.title
>    return printed

<UNTESTED>
list.sort(lambda x,y : cmp(y.getId(), x.getId()))
</UNTESTED>

hth

Jerome Alet