[Python-Dev] Trinary Operators (original) (raw)
Andrew Koenig ark@research.att.com
Thu, 6 Feb 2003 12:07:31 -0500 (EST)
- Previous message: [Python-Dev] Trinary Operators
- Next message: [Python-Dev] Trinary Operators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido> I think I've seen the suggestion
Guido> x = (y if y>z else z)
Guido> :-)
That's not bad, even though it looks Perlish :-)
It has the advantage of looking like a list comprehension.
I presume the parentheses would be mandatory.
- Previous message: [Python-Dev] Trinary Operators
- Next message: [Python-Dev] Trinary Operators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]