News for hackers. Stuff that matters.
Re:Why does `True == False is False` evaluate to False in Py... by mFixman on Saturday May 02, 2020 @04:54AM (#23050416)
The only correct way to parse `a < b < c` for numbers is throwing a type error.

Python comes second for source code niceness, allowing you to compare numbers to booleans is common and shouldn't be.

Re:Why does `True == False is False` evaluate to False in Py... by Scarblac on Saturday May 02, 2020 @05:38AM (#23050581)
But it doesn't compare a number to a boolean. It tests whether b is between a and c, in Python.
Re:Why does `True == False is False` evaluate to False in Py... by mFixman on Saturday May 02, 2020 @08:38AM (#23051402)
What I wrote wasn't very understandable.

In most languages, like C++, a < b < c ends up comparing a boolean to an integer. This should be a type error, but isn't.