[Python-Dev] Re: PEP 218 (sets); moving set.py to Lib

Eric S. Raymond esr@thyrsus.com
Tue, 20 Aug 2002 21:05:17 -0400

Greg Ewing <greg@cosc.canterbury.ac.nz>:
> > Um, the notation is '|' and '&', not 'or' and 'and', and those are
> > what I learned in school.
> Really? The notation I learned in school was big-rounded-U
> for union and big-upside-down-rounded-U for intersection.
> Not available in the ASCII character set, unfortunately.

For historical reasons, there are three different notations for Boolean
algebra in common use.  You're describing the one derived from  set theory. 
I personally favor the one derived from lattice algebra; the distinctive
feature of that one is the pointy and &/| operators that look like /\  and
\/.  The third uses | and &.

The set-theoretic notation is the oldest.  I think Birkhoff & MacLane
invented the lattice-theory notation in the 1940s.  It is probably
*slightly* more popular than the set-theoretic notation.  The | & one
is distinctly less common than either, at least among mathematicians;
I think EEs and suchlike may use it more than we do.

> But I agree that | and & are fairlly intuitive substitutes
> for these, and they agree with what you use for bit twiddling.

Not an insignificant point.
		<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>