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 p
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
Edward Elliott wrote:
> Dave Hansen wrote:
>
>>Not really. It was mostly a lead-in to that last sentence. Problems
>>like this couldn't happen in Python. So it's an opportunity to get a
>>giggle at the expense of programmers using a language that gives you
>>enough rope to shoot yourself in th
Dave Hansen wrote:
> Not really. It was mostly a lead-in to that last sentence. Problems
> like this couldn't happen in Python. So it's an opportunity to get a
> giggle at the expense of programmers using a language that gives you
> enough rope to shoot yourself in the foot...
Which can be enti
On Wed, 26 Apr 2006 10:20:57 -0400 in comp.lang.python, Don Taylor
<[EMAIL PROTECTED]> wrote:
>Found in a style guide (http://www.artlogic.com/careers/styleguide.html)
>---
>Another case where "unnecessary" braces should be used i
[EMAIL PROTECTED] wrote:
> wrong group
why?
--
http://mail.python.org/mailman/listinfo/python-list
wrong group
--
http://mail.python.org/mailman/listinfo/python-list
Found in a style guide (http://www.artlogic.com/careers/styleguide.html)
---
Another case where "unnecessary" braces should be used is when writing
an empty while loop:
while (*p++ = *q++)
{
// this loop intentionally left em