Re: [Zope] Sequence sorting module from a Python script

2005-04-25 Thread Leticia Larrosa
Thanks to David and Andreas.! -Original Message- From: Andreas Jung <[EMAIL PROTECTED]> To: Leticia Larrosa <[EMAIL PROTECTED]>, zope@zope.org Date: Mon, 25 Apr 2005 05:30:12 +0200 Subject: Re: [Zope] Sequence sorting module from a Python script > > > --On Sonnt

[Zope] Sequence sorting module from a Python script

2005-04-24 Thread Leticia Larrosa
Hi all: I want to order a sequence using the Sequence sorting module from a Python script. I have the following code: " seq = [['Bruzon', 'CUB'], ['Anand', 'IND'], ['Kasparov', 'RUS']] def test(oneElem, twoElem): if oneElem[0] == twoElem[0]: return 0 if oneElem[0] > twoElem[0]:

[Zope] Sequence sorting module from a Python script

2005-04-24 Thread Leticia Larrosa
Hi all: I want to order a sequence using the Sequence sorting module from a Python script. I have the following code: "seq = [['Bruzon', 'CUB'], ['Anand', 'IND'], ['Kasparov', 'RUS']]def test(oneElem, twoElem): if oneElem[0] == twoElem[0]: return 0 elif oneElem[0] twoElem[0]: return

Re: [Zope] Sequence sorting module from a Python script

2005-04-24 Thread David H
Leticia Larrosa wrote: Hi all: I want to order a sequence using the Sequence sorting module from a Python script. I have the following code: " seq = [['Bruzon', 'CUB'], ['Anand', 'IND'], ['Kasparov', 'RUS']] def test(oneElem, twoElem): if oneElem[0] == twoElem[0]: return 0

Re: [Zope] Sequence sorting module from a Python script

2005-04-24 Thread Andreas Jung
--On Sonntag, 24. April 2005 17:36 Uhr -0400 Leticia Larrosa [EMAIL PROTECTED] wrote: sort_on =(('self', test, 'desc')) As documented the 'sort_on_ parameter must be a *sequence* of sorting definitions and a *single* sorting definition. This should work: sort_on =(('self', test, 'desc'),) -aj