[Python-3000] Need closure on __cmp__ removal
Guido van Rossum
guido at python.org
Wed Jan 9 01:35:25 CET 2008
That's a different issue altogether (and your wish is not likely going
to be granted unless you write a PEP).
On Jan 8, 2008 4:23 PM, hashcollision <hashcollision at gmail.com> wrote:
> +1 from me too if you only need to define __lt__ and __eq__ and __le__ and
> __gt__, etc, will default to that. If it dosn't default to those, I feel
> that one would need to write too many functions.
> On Jan 8, 2008 7:12 PM, Steven Bethard <steven.bethard at gmail.com> wrote:
> > On Jan 8, 2008 3:55 PM, Brett Cannon <brett at python.org> wrote:
> > > On Jan 8, 2008 2:41 PM, Guido van Rossum <guido at python.org > wrote:
> > > > list.sort() and built-in sorted() are the least of our problems: even
> > > > though the API uses cmp, the implementation actually only ever uses
> > > > '<'; and the preferred API is to use the 'key' argument instead of
> > > > passing a compare function; that's much more efficient.
> > > >
> > > > Maybe we should retire the compare function completely in 3.0?
> > > >
> > >
> > > +1 from me. I personally have always hated the whole, -1, 0, 1 style
> > > of comparison anyway.
> > +1 from here too. I've found it frustrating that the first argument
> > to sort() and sorted() is the least useful. ;-)
> > Steve
> > --
> > I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
> > tiny blip on the distant coast of sanity.
> > --- Bucky Katt, Get Fuzzy
> Python-3000 mailing list
> Python-3000 at python.org
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000