On Wednesday, June 29, 2016 at 8:06:10 AM UTC+5:30, Steven D'Aprano wrote: > On Tue, 28 Jun 2016 12:10 am, Rustom Mody wrote: > > > Analogy: Python's bool as 1½-class because bool came into python a good > > decade after python and breaking old code is a bigger issue than fixing > > control constructs to be bool-strict > > That analogy fails because Python bools being implemented as ints is not a > bug to be fixed, but a useful feature. > > There are downsides, of course, but there are also benefits. It comes down > to a matter of personal preference whether you think that bools should be > abstract True/False values or concrete 1/0 values. Neither decision is > clearly wrong, it's a matter of what you value. > > Whereas some decisions are just dumb: > > https://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and-stupid/
Answered in "Operator Precedence/Boolean" thread where this is more relevant -- https://mail.python.org/mailman/listinfo/python-list