[Python-ideas] PEP: Dict addition and subtraction

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 8 20:22:26 EST 2019


Guido van Rossum wrote:
> I guess everybody's high school math(s) class was different. I don't 
> ever recall seeing + and * for boolean OR/AND; we used ∧ and ∨.

Boolean algebra was only touched on briefly in my high school
years. I can't remember exactly what notation was used, but it
definitely wasn't ∧ and ∨ -- I didn't encounter those until
much later.

However, I've definitely seen texts on boolean alegbra in
relation to logic circuits that write 'A and B' as 'AB',
and 'A or B' as 'A + B'. (And also use an overbar for
negation instead of the mathematical ¬).

Maybe it depends on whether you're a mathematician or an
engineer? The multiplication-addition notation seems a lot
more readable when you have a complicated boolean expression,
so I can imagine it being favoured by pragmatic engineering
type people.

-- 
Greg


More information about the Python-ideas mailing list