PEP 308: Alternative conditional operator forms
Erik Max Francis
max at alcyone.com
Wed Feb 12 01:19:21 CET 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
> 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