For review: PEP 308 - If-then-else expression
Aahz
aahz at pythoncraft.com
Mon Feb 10 00:48:57 EST 2003
In article <R3B1a.158635$0v.4436343 at news1.tin.it>,
Alex Martelli <aleax at aleax.it> wrote:
>
>So maybe the syntax should be:
>
> [whentrue if condition else whenfalse]
>
>i.e., just like in the PEP *BUT* with brackets around it. Minus: the
>brackets suggest "list" and there's no list here. Pluses: remove the
>"can almost appear anywhere", add the "tell the reader", exploit the
>"trailing if" habit from LC's -- the lack of any 'for' clause should be
>sufficient to distinguish this from LC's, I think.
How about
<if cond then whentrue else whenfalse>
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Register for PyCon now! http://www.python.org/pycon/reg.html
More information about the Python-list
mailing list