On 2006-11-10 15:24:50 -0500, Bjoern Schliessmann 
<[EMAIL PROTECTED]> said:

> Marc 'BlackJack' Rintsch wrote:
> 
>> No it doesn't -- look again at the example given above.  It's
>> legal syntax in Python but doesn't have the semantics implied by
>> the example.
> 
> Sorry, I don't understand -- what is the difference between the
> example as it is and the implied semantics of it?
> 
> Regards,
> 
> 
> Björn

Yes, I'm not sure myself.

In [1]: color = "red"

In [2]: if color == "red" or "blue" or "green":
   ...:     print 'Works.'
   ...:
   ...:
Works.

In [3]: if color == "blue" or "red" or "green":
   ...:     print 'Works.'
   ...:
   ...:
Works.

In [4]: if not color == "blue" or "green":
   ...:     print 'Works.'
   ...:
   ...:
Works.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to