[Python-Dev] Trinary Operators
Guido van Rossum
guido@python.org
Thu, 06 Feb 2003 13:35:50 -0500
> You might consider correlating votes with people who like lambda,
> because that's where I think the feature is really useful.
Good point.
> Which implies, by the way, that parentheses shouldn't be mandatory
> in the following context:
>
> (lambda x, y, z: y if x else z)
>
> Or, for that matter, in
>
> (lambda x, y, z: f(x, y if x else z))
But does
x, y if p else z
mean
x, (y if p else z)
or
(x, y) if p else z
???
--Guido van Rossum (home page: http://www.python.org/~guido/)