11 Dec
2008
11 Dec
'08
12:44 p.m.
On 11.12.2008 12:28 Uhr, Peter Bengtsson wrote:
Personally I prefer to always use objectValues(). Sorting isn't objectXXX()'s problem. It's something you do in your view. objs = list(self.objectValues()) objs.sort(lambda x,y: cmp(x.id, y.id))
Never ever use obj.id. The official API is obj.getId() - nothing else. Andreas