PEP 308: Alternative conditional operator forms
Erik Max Francis
max at alcyone.com
Tue Feb 11 19:19:21 EST 2003
Roy Smith wrote:
> Erik Max Francis <max at alcyone.com> wrote:
>
> > Use parentheses for clarity, sure. _Require_ them, I don't see.
>
> Well, they're required for function calls. Surely you're not
> advocating
> making them optional in that case?
Oh come on, that is totally taken out of context. A better analogy
would be requiring them for the addition operator. There are times when
it's clearly useful to use parentheses for clarity. But that hardly
means they should be _required_.
x = a + b # illegal, should be (a + b)
x = (a + b)*c # fine
x = a + b*c # illegal, should be (a + b*c)
x = f(a + b) # illegal, should be f((a + b))
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Being in love for real / It ain't like a movie screen
\__/ India Arie
Bosskey.net: Aliens vs. Predator 2 / http://www.bosskey.net/avp2/
A personal guide to Aliens vs. Predator 2.
More information about the Python-list
mailing list