Re: [Zope] python question

2005-07-01 Thread Fred Drake
On 7/1/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: > i think there should be no functional difference in the two code snippets > below, but is there any difference in performance? Don't know, and don't care; these are (at the Python level) functionally different. > (i know, the "except Attribu

Re: [Zope] python question

2005-07-01 Thread Andreas Jung
--On 1. Juli 2005 17:10:58 +0200 Jürgen Herrmann <[EMAIL PROTECTED]> wrote: hi all! i think there should be no functional difference in the two code snippets below, but is there any difference in performance? You could benchmark it :-) -aj pgphfg7D56dFp.pgp Description: PGP signature __

RE: [Zope] python question

2005-05-31 Thread Jim Abramson
blast! i'll keep my mouth shut til I get the library memorized. Jim > -Original Message- > From: Tino Wildenhain [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 31, 2005 4:06 PM > To: Jim Abramson > Cc: Kate Legere; Zope > Subject: RE: [Zope] python questio

RE: [Zope] python question

2005-05-31 Thread Tino Wildenhain
Am Dienstag, den 31.05.2005, 15:38 -0400 schrieb Jim Abramson: > sort() on a sequence does not return anything. It operates on the > [mutable] sequence in place. sequence is a module in Zope. So she indeed was right. ___ Zope maillist - Zope@zope.org

Re: [Zope] python question

2005-05-31 Thread Tino Wildenhain
Am Dienstag, den 31.05.2005, 15:34 -0400 schrieb Kate Legere: > I may be asking this in the wrong place but I have a tal page where I want > to use python to display only the most recent addition to a folder of files. > > > I can sort the folder and return all the files easily with: > return seq

RE: [Zope] python question

2005-05-31 Thread Kate Legere
Thanks - turns out the real error was in the file dealing with it - all fixed now. Thanks for the help. Kate -Original Message- From: Jim Abramson [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 31, 2005 2:38 PM To: Kate Legere; Zope Subject: RE: [Zope] python question sort() on a

Re: [Zope] python question

2005-05-31 Thread J Cameron Cooper
Kate Legere wrote: I may be asking this in the wrong place but I have a tal page where I want to use python to display only the most recent addition to a folder of files. I can sort the folder and return all the files easily with: return sequence.sort(files, (('bobobase_modification_time', 'cm

RE: [Zope] python question

2005-05-31 Thread Jim Abramson
sort() on a sequence does not return anything. It operates on the [mutable] sequence in place. You probably want to push this bit into a python script where you have more elbow room, and do this: files.sort(etc,etc) return files[0] hth, Jim > -Original Message- > From: [EMAIL PROTECT