Operator Precedence/Boolean Logic

Marko Rauhamaa marko at pacujo.net
Thu Jun 23 02:46:16 EDT 2016


Andreas Röhler <andreas.roehler at online.de>:

> Indeed, why should the result of 4 - 4 have a different truth-value
> than 4 - 3 ? This implementation seems to be a legacy from languages
> without boolean types.

In Lisp, only nil (= the empty list) is accepted as false, everything
else is considered true.

In Scheme, only #f (= False) is accepted as false, everything else is
considered true even though there is also a dedicated #t for True.


Marko


More information about the Python-list mailing list