On 28 Oct, 2010, at 16:21, Dan Ross wrote: > I don't think this is Mac specific, but I wonder if someone could explain why > these two groups of code behave differently: > > [code] > > colors = ['red', 'green', 'blue', 'orange', 'fuscia', 'black', 'white'] > > list_of_matches = [] > for x in colors: > if x == 'red' or 'green' or 'blue': >
This parses as: if x == ('red' or 'green' or blue'): Ronald
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG