Ternary Operator Now?

2006-02-08 Thread Ben Wilson
I read somewhere else that Python was getting a ternary operator (e.g. x = (true/false) ? y : z). I read the PEP about it and that the PEP had been approved this past Fall. Has this been released into the wild yet? IIRC, the operator is like: x = y if C : else z --

Re: Ternary Operator Now?

2006-02-08 Thread Xavier Morel
Ben Wilson wrote: I read somewhere else that Python was getting a ternary operator (e.g. x = (true/false) ? y : z). I read the PEP about it and that the PEP had been approved this past Fall. Has this been released into the wild yet? IIRC, the operator is like: x = y if C : else z PEP

Re: Ternary Operator Now?

2006-02-08 Thread Steve Holden
Ben Wilson wrote: I read somewhere else that Python was getting a ternary operator (e.g. x = (true/false) ? y : z). I read the PEP about it and that the PEP had been approved this past Fall. Has this been released into the wild yet? IIRC, the operator is like: x = y if C : else z

Re: Ternary Operator Now?

2006-02-08 Thread Roy Smith
Steve Holden [EMAIL PROTECTED] wrote: x = y if C : else z Currently scheduled for next (2.5) release, but not yet implemented. This still makes me barf. Has Python jumped the shark? It looks marginally better if you write it as: x = (y if C else z) --