For review: PEP 308 - If-then-else expression

Jp Calderone exarkun at
Sat Feb 8 07:41:43 CET 2003

On Sat, Feb 08, 2003 at 01:48:02AM -0200, cribeiro at wrote:
> [snip - current idioms]
> Oh well. I just gave up discussing short-circuiting evaluation and there
> we go again. The two blocks of code are not equivalent; change z for an
> expression with some side effect (for example, a function call), and then
> the results will be completely different.

  Sorry, I must have missed that part of the thread :)  I'm a big fan of
short-circuit, just not a big fan of adding a ternary operator.  If you need
it that badly, write a function (No, it isn't current impossible, it's just


 up 0:36, 5 users, load average: 0.00, 0.00, 0.00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list