(no) fast boolean evaluation ?

Irmen de Jong irmen.NOSPAM at xs4all.nl
Fri Aug 3 13:21:40 EDT 2007


John Machin wrote:

> 
> (you_are_confused and/or
> function_returns_bool_but_has__side_effects())
> 

That above expression should be written more explicitly like:

function_result = function_returning_bool_but_with_side_effects()

if you_are_confused or function_result:
   do_something_nice()


--irmen



More information about the Python-list mailing list