Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96832
| From | Random832 <random832@fastmail.com> |
|---|---|
| References | <mailman.30.1442580482.16376.python-list@python.org> <55fc0e4d$0$1645$c3e8da3$5496439d@news.astraweb.com> <1442583652.2433512.387297097.0C910B45@webmail.messagingengine.com> <mthktk$q5p$1@ger.gmane.org> |
| Subject | Re: True == 1 weirdness |
| Date | 2015-09-18 15:12 -0400 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2.1442603566.21674.python-list@python.org> (permalink) |
On Fri, Sep 18, 2015, at 14:24, Terry Reedy wrote: > If a, b, c are members of a totally ordered set, so that < is > transitive, this is equivalent to max(a,c) < b. But the latter makes an > irrelevant comparison between a and c. But *who would write that?* It's not a natural form of notation. I'm not saying it doesn't mean anything in Python. Obviously everything that is allowed means something. I'm saying no-one would write that in an ordinary context of human communication and expect to be understood. > > Your claim seemed to be that these combinations *are* > > used, since you claimed that python implements the *same* semantics. > > The semantics Python copies from math is "a op b op c == a op b and b op > c", I don't believe those *are* the semantics in math. I believe that in math this notation is *specifically* meant to support "all of these things are related to all of the others in ways that can be summarized in a single expression" and that mixing operations in a way that does not allow that is a misuse of the notation. In other words, any "a op b op c" that does not allow you to make a statement on how a is related to c is a *mistake*, because it means that you're welding together two things that aren't logically connected to each other at all. If there is no operator op3 where a op1 b op2 c implies a op3 c, then you should not put a and c in the same inequality, full stop. > where 'op' is a binary predicate or comparison operator. I also > happen to believe you are wrong in the specific examples. But the > semantic copying would apply even if a particular combination had not > yet ever been used.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: True == 1 weirdness Random832 <random832@fastmail.com> - 2015-09-18 08:47 -0400
Re: True == 1 weirdness Steven D'Aprano <steve@pearwood.info> - 2015-09-18 23:14 +1000
Re: True == 1 weirdness Random832 <random832@fastmail.com> - 2015-09-18 09:40 -0400
Re: True == 1 weirdness Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-09-19 19:19 +1200
Re: True == 1 weirdness Terry Reedy <tjreedy@udel.edu> - 2015-09-18 14:24 -0400
Re: True == 1 weirdness Random832 <random832@fastmail.com> - 2015-09-18 15:12 -0400
Re: True == 1 weirdness Jussi Piitulainen <harvesting@makes.email.invalid> - 2015-09-19 09:23 +0300
Re: True == 1 weirdness Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-18 15:13 -0600
Re: True == 1 weirdness Random832 <random832@fastmail.com> - 2015-09-18 17:21 -0400
csiph-web