[Python-Dev] Boolean transition
Greg Ewing
greg@cosc.canterbury.ac.nz
Mon, 11 Mar 2002 14:09:57 +1300 (NZDT)
martin@v.loewis.de (Martin v. Loewis):
> "David Abrahams" <david.abrahams@rcn.com> writes:
>
> > This rubs my expectations the right way. Does it foreshadow the
> > introduction of boolean operators (e.g. &, |, &&, ||)?
>
> I hope not. "and", "or" is boolean enough, for me. No more line noise
> is needed.
We certainly don't need '&&' and '||' -- we already have them,
they're called 'and' and 'or'.
But if booleans are to become a separate type eventually,
I think that '&' and '|' should perform the standard
(non-shortcircuiting) boolean algebra operations on them.
In fact, that could be added now to the reference
implementation in the PEP -- I don't think it would
introduce any extra breakage.
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+