Michael Hobbs wrote: > That is, assume that the expression ends at the colon, not at the > newline. That would make this type of statement possible: > if color == red or > color == blue or > color == green: > return 'primary' > Right now, such a statement would have to be spelled thus: > if color == red or \ > color == blue or \ > color == green: > return 'primary' > or > if (color == red or > color == blue or > color == green): > return 'primary'
What about if color == red or blue or green: return 'primary' :) Really, I think it'd be more mess to let the if statement's end only depend on ":". I think there could arise situations that are messy to debug. If I need multiple lines I prefer the parentheses. Regards, Björn -- BOFH excuse #295: The Token fell out of the ring. Call us when you find it. -- http://mail.python.org/mailman/listinfo/python-list