Edward Elliott wrote: > 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.
Thus proving the original claim about it being confusing. :) I think he intended it to parse this way: if ($x) { $y++ if $z; } else { $z--; } Carl Banks -- http://mail.python.org/mailman/listinfo/python-list