Guido rethinking removal of cmp from sort method

Chris Angelico rosuav at gmail.com
Sat Apr 2 04:43:46 CEST 2011


On Sat, Apr 2, 2011 at 1:29 PM, Paul Rubin <no.email at nospam.invalid> wrote:
> 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...

To me, "batteries included" means that I can:
1) Write a Python script on any Ubuntu laptop that I put my hands on,
and expect it to work.
2) Put a shebang on it, chmod it plus exx, and give it to someone, and
expect it to work on his system.
3) Post it to my web site along with the comment "You will need a
Python interpreter to run this", and expect it to work.

Every third-party library I need weakens that. Sure, situation 1 isn't
too hard; but the other two end up becoming a bit awkward. The
Yosemite Project requires a support module on Windows, making it that
bit harder to share with people; but I accept that, because it's doing
some rather unusual things (simulating keypresses on another window).
Sorting a list is not unusual enough to justify a third-party module.

ChrisA



More information about the Python-list mailing list