[Zope] Sorting objectValues in Python Script
Jerome Alet
alet@librelogiciel.com
Fri, 18 Oct 2002 15:38:28 +0200
On Fri, Oct 18, 2002 at 09:35:47AM -0400, Casey Duncan wrote:
> Ick, no lambda needed:
>
> items = context.objectItems()
> items.sort()
> for id, object in items:
> print id, object
> return printed
>
> sort is *much* faster when you don't use a comparison function as well (though sometimes you do need them).
then you'd have to call reverse() too, because he wanted them in reverse
order.
bye,
Jerome Alet