Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106742
| From | Random832 <random832@fastmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: how to convert code that uses cmp to python3 |
| Date | 2016-04-09 11:59 -0400 |
| Message-ID | <mailman.127.1460217573.2253.python-list@python.org> (permalink) |
| References | (8 earlier) <5707BE18.1050805@rece.vub.ac.be> <CAPTjJmoMuqwg0Q_fp=qitC3wWkXYHtdqBNVGzO+3ToAmsgit8Q@mail.gmail.com> <5708C8B0.6050904@rece.vub.ac.be> <85twjb3su5.fsf@benfinney.id.au> <1460217570.3805671.573759817.78567E5F@webmail.messagingengine.com> |
On Sat, Apr 9, 2016, at 07:49, Ben Finney wrote: > I find that a dubious claim. > > The ‘cmp’ implementation must decide *at least* between three > conditions: less-than, equal-to, greater-than. That is *at least* two > inflection points. Yes, but in a sequence it can decide that at each element, and only has to reach the end of the list in the (relatively rare) case that they're equal. For that matter, it only has to determine less than vs greater than for the first unequal element.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: how to convert code that uses cmp to python3 Random832 <random832@fastmail.com> - 2016-04-09 11:59 -0400
csiph-web