[Python-Dev] ANN: PEP 335: Overloadable Boolean Operators (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Fri Sep 10 22:59:06 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 ]
Phillip J. Eby wrote:
I like the PEP with 'and' and 'or', but isn't the 'not' special method essentially the inverse of nonzero?
There isn't such a method currently.
Did you mean to say that there is currently no method named nonzero? This is not true:
class X: ... def nonzero(self): ... print "Called" ... return 13 ... not X() Called False
Regards, Martin
- 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 ]