Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96836

Re: True == 1 weirdness

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> <1442603558.2508492.387585473.6851D82C@webmail.messagingengine.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2015-09-18 15:13 -0600
Subject Re: True == 1 weirdness
Newsgroups comp.lang.python
Message-ID <mailman.6.1442610862.21674.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Sep 18, 2015 at 1:12 PM, Random832 <random832@fastmail.com> wrote:
> On Fri, Sep 18, 2015, at 14:24, Terry Reedy wrote:
>> 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.

Whoever wrote the Wikipedia article disagrees:

https://en.wikipedia.org/wiki/Inequality_(mathematics)#Chained_notation

Although the reference to Python leads one to suspect that this could
be based more on Python's semantics than on actual mathematics.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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