[Python-3000] Wither PEP 335 (Overloadable Boolean Operators)?

Greg Ewing greg.ewing at canterbury.ac.nz
Sun May 20 02:28:04 CEST 2007


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


More information about the Python-3000 mailing list