PEP 308: ternary operator
Jarek Zgoda
jzgoda at usun.gazeta.pl
Fri Feb 21 16:21:16 EST 2003
Sheila King <usenet at thinkspot.net> pisze:
> I also prefer the construct
>
> (true-expr) when (cond-expr) else (false-expr)
Where it comes from?
I think that more "natural" would be:
when (cond-expr) then (true-expr) else (false-expr)
or am I dumb T-SQL programmer?!
(I'm recalling the 'case when (cond) then (expr) else (expr)' syntax of
Transact-SQL).
--
Jarek Zgoda
http://www.zgoda.biz/ JID:jarek at jabberpl.org
More information about the Python-list
mailing list