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

Jp Calderone exarkun at intarweb.us
Sat Feb 8 15:47:21 EST 2003


On Sat, Feb 08, 2003 at 12:23:58AM -0800, Erik Max Francis wrote:
> Jp Calderone wrote:
> 
> >   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).
> 
> You can't get short circuiting behavior by writing a function, 

  Yes you can, as you admit below.

> unless
> you want to do obtuse things like alternately eval different passed-in
> strings in the function.
> 

  Jp

-- 
Seduced, shaggy Samson snored.
She scissored short.  Sorely shorn,
Soon shackled slave, Samson sighed,
Silently scheming,
Sightlessly seeking
Some savage, spectacular suicide.
                -- Stanislaw Lem, "Cyberiad"
-- 
 up 0:28, 7 users, load average: 0.09, 0.07, 0.09
-------------- 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/083f8c39/attachment.sig>


More information about the Python-list mailing list