[Zope] sorting ids in python

robert rottermann robert at redcor.ch
Tue Dec 9 01:09:50 EST 2008


Andreas Jung schrieb:
> On 08.12.2008 21:11 Uhr, robert rottermann wrote:
>> Garry Saddington schrieb:
>>> Can anyone help me sort the following by id in a python script?
>>>
>>> for object in context.objectValues(['Folder', 'DTML
>>> Document','ZipFolder','File','Image']):
>>
>> objs=context.objectValues(['Folder',
>> 'DTMLDocument','ZipFolder','File','Image'])
>> objs.sort()
>> for o in objs:
>>   ..
> 
> huh? Afaik there is no sort order defined on a per-object basis.wh
I *allways* mixup objecItems with objectValues
so its objecItems(..).sort() ..
robert


More information about the Zope mailing list