if then elif
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Wed Oct 10 22:52:59 EDT 2007
On Wed, 10 Oct 2007 20:42:26 -0600, Michael L Torrie wrote:
> chris.monsanto at gmail.com wrote:
>
>
>> that's the most incorrect thing i've heard all day!
>>
>> if cal or fat <= 0 is parsed as if (cal) or (fat <= 0)
>
> Which is exactly what he said.
Heh, that was my first thought too, for about 3.2 milliseconds. And then
I realised that, no, he actually said:
'cal or fat' is evaluated first
that is, it was parsed like
if (cal or fat) <= 0
which is not correct.
--
Steven.
More information about the Python-list
mailing list