Another conditional expression candidate (PEP 308)
Erik Max Francis
max at alcyone.com
Mon Feb 10 22:39:29 EST 2003
Evan wrote:
> This is part of why I suggested mandatory parens. Then both of these
> are legal, and there is no confusion:
>
> result = (if cond: x else: y)
>
> result = (if cond:
> x
> else:
> y)
Why make them mandatory? If you want to go multiline, you can just add
the parentheses yourself and get them for free. Making them mandatory
seems heavy handed for getting a certain indentation flow you _might_
want to use.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Ride / Ride this wave of mine
\__/ Res
Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
An Esperanto reference for English speakers.
More information about the Python-list
mailing list