[Python-Dev] ANN: PEP 335: Overloadable Boolean Operators (original) (raw)

Michel Pelletier michel at dialnetwork.com
Thu Sep 9 09:46:24 CEST 2004


Message: 4 Date: Fri, 10 Sep 2004 12:58:23 +1200 From: Greg Ewing <greg at cosc.canterbury.ac.nz> Subject: [Python-Dev] ANN: PEP 335: Overloadable Boolean Operators To: python-dev at python.org Message-ID: <200409100058.i8A0wNIV002743 at cosc353.cosc.canterbury.ac.nz>

Python does not currently provide any 'xxx' special methods corresponding to the 'and', 'or' and 'not' boolean operators.

I like the PEP with 'and' and 'or', but isn't the 'not' special method essentially the inverse of nonzero?

-Michel



More information about the Python-Dev mailing list