learning python ...
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue May 25 18:44:17 EDT 2021
> On 2021-05-24, Alan Gauld via Python-list <python-list at python.org> wrote:
>> Although wouldn't it be "expected boolean expression" rather than
>> conditional expression? Python doesn't care how the argument to 'if'
>> is arrived at so long as it's a boolean.
This isn't really true either. Almost every object in Python has
an interpretation as true or false, and can be used wherever a
boolean value is needed.
--
Greg
More information about the Python-list
mailing list