Re: [Python-3000] Need closure on __cmp__ removal

2008-01-18 Thread Lars Immisch
Mike Klaas wrote: > On 18-Jan-08, at 1:37 PM, Lars Immisch wrote: >> >> I like cmp, too. I've looked through my code, and I've only used it in >> script-ish circumstances, but here is an example that sorts a list of >> files by modification date: >> >> def cmp_mtime(f, g): >> """Too much for a

Re: [Python-3000] Need closure on __cmp__ removal

2008-01-18 Thread Lars Immisch
David A. Wheeler wrote: > Bill Janssen: >> I'm a bit baffled here; I find cmp() fairly handy in writing sort routines... >> Is there a better / newer / official way of doing this? If not, isn't >> "cmp()" still useful to have around? > > I agree with you - I find cmp() useful, and I notice that so

Re: [Python-3000] Need closure on __cmp__ removal

2008-01-18 Thread Mike Klaas
On 18-Jan-08, at 1:37 PM, Lars Immisch wrote: > > I like cmp, too. I've looked through my code, and I've only used it in > script-ish circumstances, but here is an example that sorts a list of > files by modification date: > > def cmp_mtime(f, g): > """Too much for a lambda for my tastes.""" >