Stelios Xanthakis wrote: > Also, I think that perl does that because otherwise code like > > if ($x) $y++ if $z; else $z--; > > would be even more confusing :)
With or without braces, that's not legal code. A one-line if can't be followed by an else. The closest you can do is this: $y++ if $z; $z-- if !$z; but that's two statements. Your example would need braces even if they were optional. -- http://mail.python.org/mailman/listinfo/python-list