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

Jp Calderone exarkun at intarweb.us
Sat Feb 8 01:41:43 EST 2003


On Sat, Feb 08, 2003 at 01:48:02AM -0200, cribeiro at mail.inet.com.br 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
odd-looking).

  Jp

-- 
 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: <http://mail.python.org/pipermail/python-list/attachments/20030208/c867e805/attachment.sig>


More information about the Python-list mailing list