(no) fast boolean evaluation ?

Ed Leafe ed at leafe.com
Fri Aug 3 12:35:25 EDT 2007


On Aug 3, 2007, at 11:57 AM, Bruno Desthuilliers wrote:

> Sorry, I forgot to mention the language did not allow to have else  
> & if
> in the same statement. IOW :
>
> if some_condition then
>    do_sometehing
> else
>    if some_other_condition then
>      do_something_else
>    else
>      if yet_another_condition then
>        do_yet_another_thing
>      else
>        if your_still_here then
>           give_up('this language is definitively brain dead')
>        end if
>      end if
>    end if
> end if

	Usually that's because the language provides a switch/case statement  
construct. If it does and you try to write the above code, it isn't  
the language that's brain-dead!  ;-)

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com





More information about the Python-list mailing list