Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80503
| X-Received | by 10.66.150.162 with SMTP id uj2mr28785676pab.35.1415675390036; Mon, 10 Nov 2014 19:09:50 -0800 (PST) |
|---|---|
| X-Received | by 10.140.91.118 with SMTP id y109mr588163qgd.3.1415675389687; Mon, 10 Nov 2014 19:09:49 -0800 (PST) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h15no1985628igd.0!news-out.google.com!u1ni2qah.0!nntp.google.com!u7no709133qaz.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Mon, 10 Nov 2014 19:09:49 -0800 (PST) |
| In-Reply-To | <eb697764-934b-4650-af28-1c55520bc1da@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=86.16.187.127; posting-account=p34d-wkAAAC60rn_Tuk_HKyjfq-hlvCF |
| NNTP-Posting-Host | 86.16.187.127 |
| References | <eb697764-934b-4650-af28-1c55520bc1da@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <fc99182d-8779-460d-90b7-4e9a8ff9c548@googlegroups.com> (permalink) |
| Subject | Re: "Natural" use of cmp= in sort |
| From | Paddy <paddy3118@gmail.com> |
| Injection-Date | Tue, 11 Nov 2014 03:09:49 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.python:80503 |
Show key headers only | View raw
On Monday, 10 November 2014 18:45:15 UTC, Paddy wrote: > Hi, I do agree with Raymond H. about the relative merits of cmp= and key= in sort/sorted, but I decided to also not let natural uses of cmp= pass silently. > > In answering this question, http://stackoverflow.com/a/26850434/10562 about ordering subject to inequalities it seemed natural to use the cmp= argument of sort rather than key=. > > The question is about merging given inequalities to make 1 inequality such that the inequalities also stays true. > > Thanks Peter, Ian. I have modified my code to expand transitive relations and ask you to view it on stackoverflow via the original link (as posting code on newsgroups is an ugly hack). My main reason for the post to c.l.p remains though; it seems like a *natural* use of the cmp= comparator function to sorted rather than using key= .
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
"Natural" use of cmp= in sort Paddy <paddy3118@gmail.com> - 2014-11-10 10:45 -0800
Re: "Natural" use of cmp= in sort Peter Otten <__peter__@web.de> - 2014-11-10 20:19 +0100
Re: "Natural" use of cmp= in sort Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-10 12:43 -0700
Re: "Natural" use of cmp= in sort Paddy <paddy3118@gmail.com> - 2014-11-10 18:03 -0800
Re: "Natural" use of cmp= in sort Paddy <paddy3118@gmail.com> - 2014-11-10 19:09 -0800
Re: "Natural" use of cmp= in sort Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-10 23:36 -0700
Re: "Natural" use of cmp= in sort Paddy <paddy3118@gmail.com> - 2014-11-10 23:44 -0800
Re: "Natural" use of cmp= in sort Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-11 01:35 -0700
Re: "Natural" use of cmp= in sort Paddy <paddy3118@gmail.com> - 2014-11-11 01:21 -0800
Re: "Natural" use of cmp= in sort Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-11 10:59 -0700
Re: "Natural" use of cmp= in sort Paddy <paddy3118@gmail.com> - 2014-11-12 00:09 -0800
csiph-web