Eric S. Raymond
Guido van Rossum
: Um, the notation is '|' and '&', not 'or' and 'and', and those are what I learned in school. Seems pretty conventional to me (Greg Wilson actually tried this out on unsuspecting newbies and found that while '+' worked okay, '*' did not -- read the PEP).
+1 on preferring | and & to `or' and `and'. To me, `or' and `and' say that what's being composed are predicates, not sets.
I concur completely. Using 'or' and 'and' seems close to overriding 'is' (although that's impossible, of course) to me. To me, the expression set1 and set2 should return the first set, if empty, or the second set, if the first one is empty. Suddenly having their intersection would be very surprising, I think. For set1 & set2 to return their intersection, however, is very consistent with int1 & int2 -- Magnus Lie Hetland The Anygui Project http://hetland.org http://anygui.org