[Python-Dev] Re: PEP 335: Overloadable Boolean Operators

Fredrik Lundh fredrik at pythonware.com
Mon Sep 13 22:47:40 CEST 2004


Greg Ewing wrote:

> To permit short-circuiting, processing of the 'and' and 'or' operators
> is split into two phases.  Phase 1 occurs after evaluation of the first
> operand but before the second.  If the first operand defines the
> appropriate phase 1 method, it is called with the first operand as
> argument.  If that method can determine the result without needing the
> second operand, it returns the result, and further processing is
> skipped.

nice.

+1 from here (but only +0 on the method names).

</F> 





More information about the Python-Dev mailing list