[Python-Dev] ANN: PEP 335: Overloadable Boolean Operators (original) (raw)
Greg Ewing greg at cosc.canterbury.ac.nz
Thu Sep 16 03:46:52 CEST 2004
- Previous message: [Python-Dev] ANN: PEP 335: Overloadable Boolean Operators
- Next message: [Python-Dev] ANN: PEP 335: Overloadable Boolean Operators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Consider also this: x and 4 or 5 which is of course a common idiom to workaround the lack of an if-then-else expression.
Actually, I hope it isn't common, because it's flawed. It doesn't always work properly even with current Python semantics.
Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
- Previous message: [Python-Dev] ANN: PEP 335: Overloadable Boolean Operators
- Next message: [Python-Dev] ANN: PEP 335: Overloadable Boolean Operators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]