Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32537
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: sort order for strings of digits |
| Date | 2012-10-31 19:05 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <k6rfdu$rgn$1@news.albasani.net> <r6o298hjti156vakv253ptce9hs9u9ge4d@invalid.netcom.com> <k6s5fc$pq1$1@ger.gmane.org> <CALwzidn9iVBUK9eLbuhfSBSA_Y_FqjhCmvx7JTTNyxXSJgS-Fg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3130.1351724723.27098.python-list@python.org> (permalink) |
On Wed, 31 Oct 2012 16:24:21 -0600, Ian Kelly <ian.g.kelly@gmail.com>
declaimed the following in gmane.comp.python.general:
>
> Use functools.cmp_to_key for porting cmp functions. "sort(x, my_cmp)"
> becomes "sort(x, key=cmp_to_key(my_cmp))"
>
> The cmp builtin is also gone. If you need it, the suggested replacement
> for "cmp(a, b)" is "(b < a) - (a < b)".
>
OUCH... Just another reason for my to hang onto the 2.x series as
long as possible (I only installed 2.7 this summer, I'd been using
2.5... And a project at my former employment was still running 2.3 and
having conflicts with a program with a binary extension written for 2.2
-- and we couldn't find the source for the extension to rebuild it!)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sort order for strings of digits djc <djc@kangoo.invalid> - 2012-10-31 15:17 +0000
Re: sort order for strings of digits Hans Mulder <hansmu@xs4all.nl> - 2012-10-31 16:31 +0100
Re: sort order for strings of digits Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-31 09:44 -0600
Re: sort order for strings of digits Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-31 14:17 -0400
Re: sort order for strings of digits Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-31 21:33 +0000
Re: sort order for strings of digits Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-31 19:05 -0400
Re: sort order for strings of digits Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-31 23:44 +0000
Re: sort order for strings of digits Chris Angelico <rosuav@gmail.com> - 2012-11-01 11:53 +1100
Re: sort order for strings of digits Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-02 00:27 +0000
Re: sort order for strings of digits Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-31 23:09 +0000
Re: sort order for strings of digits DJC <djc@news.invalid> - 2012-10-31 23:45 +0000
Re: sort order for strings of digits Arnaud Delobelle <arnodel@gmail.com> - 2012-11-01 00:59 +0000
Re: sort order for strings of digits Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-01 00:30 +0000
Re: sort order for strings of digits wxjmfauth@gmail.com - 2012-11-01 01:52 -0700
csiph-web