Operator Precedence/Boolean Logic

Steven D'Aprano steve at pearwood.info
Wed Jun 29 19:44:47 EDT 2016


On Thu, 30 Jun 2016 01:00 am, Grant Edwards wrote:

> On 2016-06-29, Steven D'Aprano <steve at pearwood.info> wrote:
> 
>> To Nick, having 1+True return 2 is an accident of implementation,
> 
> My recollection is that it was not an accident of impliementation.  It
> was an intentional descision to provide compatibility with many years
> worth of programs that were written before there was either a boolean
> type or built-in True/False integer values.

You're right ... I was thinking accident of history and wrote accident of
implementation :-(


-- 
Steven
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list