python: bug or feature?

Bernhard Herzog herzog at online.de
Fri Aug 11 12:27:37 EDT 2000


ge at nowhere.none (Grant Edwards) writes:

> The notation used in the Boolean algebra classes I took were
> 
> and:  raised dot or juxtaposition
>  or:  "+"                                    
> xor:  "+" w/ circle                          
> not:  overbar
> 
> None of those are practicle, so Python adopted the operators
> used in C.

It's a bit amazing how much variation in notation and even naming there
is for this. Other names for 'and' I've seen are 'et' and 'conjunction'
and for 'or' there's 'vel' and 'disjunction' and 'alternative'. There's
apparently also a convention of using dots on both sides of binary
operators to indicate precedence: "a :&: b .|. c" would be equivalent to
"a & (b | c)".

For arithmetic there's far less variation, probably because the
conventions are much older.

-- 
Bernhard Herzog   | Sketch, a drawing program for Unix
herzog at online.de  | http://sketch.sourceforge.net/



More information about the Python-list mailing list