Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2426

Re: Guido rethinking removal of cmp from sort method

From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.python
Subject Re: Guido rethinking removal of cmp from sort method
References (9 earlier) <imtcab$r3r$1@dough.gmane.org> <mailman.9.1301475780.2990.python-list@python.org> <4d93e360$0$29996$c3e8da3$5496439d@news.astraweb.com> <mailman.105.1301693472.2990.python-list@python.org> <4d9670a9$0$29992$c3e8da3$5496439d@news.astraweb.com>
Date 2011-04-01 19:29 -0700
Message-ID <7xtyeh4c7s.fsf@ruckus.brouhaha.com> (permalink)
Organization Nightsong/Fort GNOX

Show all headers | View raw


Steven D'Aprano <steve+comp.lang.python@pearwood.info> writes:
> What I'm saying is this: cmp is already removed from sorting, and we 
> can't change the past. Regardless of whether this was a mistake or
> not, 

No it's not already removed, I just tried it (in Python 2.6, which is
called "Python" for short) and it still works.  It's not "removed" from
Python until basically all Python users have migrated and "Python"
essentially always means "Python 3".  Until that happens, for Python 2
users, Python 3 is just a fork of Python with some stuff added and some
stuff broken, that might get its act together someday.  I see in the
subject of this thread, "Guido rethinking removal of cmp from sort
method" which gives hope that one particular bit of breakage might get
fixed.

> the fact is that it is gone, and therefore re-adding it is a new feature 
> request. Those who want cmp functionality in Python 3 have three broad 
> choices: ...
> (3) port the feature that they want into a third-party module, ...
> I'm suggesting that #3 is a more practical, useful approach ...
> Having to do:
>    from sorting import csort ...
> If fans of functional programming can live 
> with "from functools import reduce", fans of cmp can live with that.

If "sorting" is in the stdlib like functools is, then the similarity
makes sense and the suggestion isn't so bad.  But you're proposing a 3rd
party module, which is not the same thing at all.  "Batteries included"
actually means something, namely that you don't have to write your
critical applications using a library base written with a Wikipedia-like
development model where anybody can ship anything, where you're expected
to examine every module yourself before you can trust it.  Stuff in the
stdlib occasionally has bugs or gaps, but it has a generally consistent
quality level, is documented, and has been reviewed and reasonably
sanity checked by a central development group that knows what it's
doing.  Stuff in 3rd party libraries has none of the above.  There are
too many places for it to go wrong and I've generally found it best to
stick with stdlib modules instead of occasionally superior modules that
have the disadvantage of coming from a third party.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Guido rethinking removal of cmp from sort method Antoon Pardon <Antoon.Pardon@rece.vub.ac.be> - 2011-03-30 11:06 +0200
  Re: Guido rethinking removal of cmp from sort method Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-03-31 02:13 +0000
    Re: Guido rethinking removal of cmp from sort method Antoon Pardon <Antoon.Pardon@rece.vub.ac.be> - 2011-03-31 11:41 +0200
      Re: Guido rethinking removal of cmp from sort method Paul Rubin <no.email@nospam.invalid> - 2011-03-31 04:59 -0700
    Re: Guido rethinking removal of cmp from sort method geremy condra <debatem1@gmail.com> - 2011-04-01 14:31 -0700
      Re: Guido rethinking removal of cmp from sort method Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-02 00:41 +0000
        Re: Guido rethinking removal of cmp from sort method geremy condra <debatem1@gmail.com> - 2011-04-01 18:22 -0700
          Re: Guido rethinking removal of cmp from sort method Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-02 11:01 +0000
            Re: Guido rethinking removal of cmp from sort method geremy condra <debatem1@gmail.com> - 2011-04-02 23:22 -0700
            Re: Guido rethinking removal of cmp from sort method Brian Quinlan <brian@sweetapp.com> - 2011-04-03 16:34 +1000
              Re: Guido rethinking removal of cmp from sort method Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-03 10:21 +0000
                Re: Guido rethinking removal of cmp from sort method geremy condra <debatem1@gmail.com> - 2011-04-03 12:58 -0700
        Re: Guido rethinking removal of cmp from sort method Paul Rubin <no.email@nospam.invalid> - 2011-04-01 19:29 -0700
          Re: Guido rethinking removal of cmp from sort method Chris Angelico <rosuav@gmail.com> - 2011-04-02 13:43 +1100
          Re: Guido rethinking removal of cmp from sort method Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-02 11:27 +0000

csiph-web