25 Jan
2007
25 Jan
'07
8:06 p.m.
--On 25. Januar 2007 15:03:19 -0500 Kate Legere <klegere@kfpl.ca> wrote:
values=ao.objectItems(items)
values.sort(lambda a,b: cmp(a[0],b[0]))
Error Type: AttributeError Error Value: 'tuple' object has no attribute 'sort'
This error message is self-explaining. You can only sort lists, not tuples.
Obviously, id isn't really what I wanted to sort by anyway but since I can't even do that I can't really go on to try to
Look at the 'sequence' module and the 'sequence.sort' method as documented in the Zope Book 2.7 Edition. -aj