For review: PEP 308 - If-then-else expression
Erik Max Francis
max at alcyone.com
Sat Feb 8 04:43:20 CET 2003
"Steven D. Arnold" wrote:
> On 2/7/03 3:22 PM, "Gerrit Holl" <gerrit at nl.linux.org> wrote:
> > IMHO, since else is obliged, 'x if a' is not allowed but 'x if a
> > else None'
> > is, which is not intuitive.
> I would agree here that "else" definitely should not be obligatory.
> "else None" should be implied if the else is missing. "Explicit is
> than implicit" is, I hope, a good rule of thumb rather than an
> principle that trumps even intuitiveness and readability.
I read this, and I honestly don't understand which stance you're taking.
Are you saying that `x if a' should be legal and mean the same as `x if
a else None'? You seem to invoke explicit-is-better-than-implicit
arguments which don't seem relevant either way here (to me, anyway).
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Shooters, looters / Now I got a laptop computer
\__/ Ice Cube
Kepler's laws / http://www.alcyone.com/max/physics/kepler/
A proof of Kepler's laws.
More information about the Python-list