Re: Conditional expressions - PEP 308

2007-01-31 Thread Colin J. Williams
Paddy wrote: On Jan 30, 9:51 pm, Colin J. Williams [EMAIL PROTECTED] wrote: It would be helpful if the rules of the game were spelled out more clearly. The conditional expression is defined as X if C else Y. We don't know the precedence of the if operator. From the little test below, it

Re: Conditional expressions - PEP 308

2007-01-31 Thread Steven Bethard
Colin J. Williams wrote: It would be helpful if the rules of the game were spelled out more clearly. The conditional expression is defined as X if C else Y. We don't know the precedence of the if operator. From the little test below, it seem to have a lower precedence than or. Thus, it

Re: Conditional expressions - PEP 308

2007-01-31 Thread Ziga Seilnacht
Colin J. Williams wrote: It would be helpful if the rules of the game were spelled out more clearly. The conditional expression is defined as X if C else Y. We don't know the precedence of the if operator. From the little test below, it seem to have a lower precedence than or. The rules are

RE: Conditional expressions - PEP 308

2007-01-31 Thread Delaney, Timothy (Tim)
Colin J. Williams wrote: Yes, I agree. The ternary operator is a step forward. That's still debateable ;) Pro: It puts paid to the python doesn't have a ternary operator and and/or abuse. Con: It shouldn't ever be used. Cheers, Tim Delaney --

Conditional expressions - PEP 308

2007-01-30 Thread Colin J. Williams
It would be helpful if the rules of the game were spelled out more clearly. The conditional expression is defined as X if C else Y. We don't know the precedence of the if operator. From the little test below, it seem to have a lower precedence than or. Thus, it is desirable for the user to put

Re: Conditional expressions - PEP 308

2007-01-30 Thread Paddy
On Jan 30, 9:51 pm, Colin J. Williams [EMAIL PROTECTED] wrote: It would be helpful if the rules of the game were spelled out more clearly. The conditional expression is defined as X if C else Y. We don't know the precedence of the if operator. From the little test below, it seem to have a