anything new on the ternary operator?

Erik Max Francis max at
Mon Jul 7 04:36:16 CEST 2003

Russell Reagan wrote:

> What is superior about using the proposed ternary operator instead of
> using
> the 'and' and 'or' operators to simulate inline logic?

Because the and/or technique doesn't quite work.  Instead of rehashing
this topic again, I'd recommend you check out the PEP 308 on the
conditional operator which goes through all the details:

   Erik Max Francis && max at &&
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ She glanced at her watch ... It was 9:23.
\__/  James Clavell

More information about the Python-list mailing list