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 is when writing >an empty while loop: > >while (*p++ = *q++) >{ > // this loop intentionally left empty... >} FWIW, I usually code this like while (*p++ = *q++) continue; > >instead of the form that is more commonly found: > >while (*p++ = *q++); PC-lint picks this up (as well as the erroneous code in the elided example), but will allow the "continue" form shown above. [...] >loop exactly once. Python programmers can stop chuckling now. >----------------------------------------------------------------------- On 26 Apr 2006 07:54:38 -0700 in comp.lang.python, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >wrong group 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... Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list