Ternary Operator

Marco Mariani m.mariani at imola.nettuno.it
Fri May 18 12:24:07 EDT 2001


On Sat, May 19, 2001 at 02:22:22AM +1000, Toby J Sargeant wrote:

> > > Now, how about
> > >         [b,c][not a]
> > 
> > Done for ages, works well.
> 
> Also evaluates both b and c, which might not be whatYouWant(tm).

Sure, and it shows. But when you take on python, it's a nice thing
to forget how C is supposed to work and just go along with coding :-)





More information about the Python-list mailing list