True == 1 weirdness

Random832 random832 at fastmail.com
Fri Sep 18 09:40:52 EDT 2015


On Fri, Sep 18, 2015, at 09:14, Steven D'Aprano wrote:
> On Fri, 18 Sep 2015 10:47 pm, Random832 wrote:
> 
> > On Fri, Sep 18, 2015, at 08:30, Steven D'Aprano wrote:
> >> On Fri, 18 Sep 2015 07:26 am, Random832 wrote:
> >> 
> >> > I don't even think chaining should
> >> > work for all *actual* comparison operations.
> >> 
> >> I don't see why. Mathematicians chain comparisons all the time. If the
> >> language implements the same semantics as mathematicians already use, why
> >> do you dislike that?
> > 
> > Please provide a citation for this claim.
> 
> Really? You're disputing that chained comparisons are a standard maths
> notation?

I'm disputing that chained comparisons are used for the particular
combinations that I am actually arguing should not be used in python.
Such as a < b > c or a != b != c [whereas a may or may not be equal to
c] or a in b in c. Your claim seemed to be that these combinations *are*
used, since you claimed that python implements the *same* semantics.



More information about the Python-list mailing list