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 308 "Conditional Expressions" has been accepted for Python 2.5, I'm pretty sure implementation hasn't even started yet. -- http://mail.python.org/mailman/listinfo/python-list
- Re: Ternary Operator Now? Xavier Morel
- Re: Ternary Operator Now? Steve Holden
- Re: Ternary Operator Now? Roy Smith