On 27 May 2010 22:57, Jean-Michel Pichavant <[email protected]> wrote:
> One possible solution
>>
>> if (
>> width == 0 and
>> height == 0 and
>> color == 'red' and
>> emphasis == 'strong' or
>> highlight > 100
>> ):
>> raise ValueError("sorry, you lose")
>>
>
Oh, one minor optimisation. You can put the last condition first:
if (
highlight > 100 or
width == 0 and
height == 0 and
color == 'red' and
emphasis == 'strong'
):
raise ValueError("sorry, you lose")
--
http://mail.python.org/mailman/listinfo/python-list