[Python-3000] Wither PEP 335 (Overloadable Boolean Operators)? (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sun May 20 02:28:04 CEST 2007
- Previous message: [Python-3000] Wither PEP 335 (Overloadable Boolean Operators)?
- Next message: [Python-3000] Wither PEP 335 (Overloadable Boolean Operators)?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Raymond Hettinger wrote:
Someone once proposed overloadable behavior for the "is" operator. IMO, the reasons for rejecting that idea also apply to this proposal.
The reason for rejecting that is that it would leave us with no way of reliably testing whether two references point to the same object.
That objection doesn't apply here, because there would still be a way of ensuring that you get boolean semantics if it matters for some reason: bool(a) and bool(b), etc.
-- Greg
- Previous message: [Python-3000] Wither PEP 335 (Overloadable Boolean Operators)?
- Next message: [Python-3000] Wither PEP 335 (Overloadable Boolean Operators)?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]