why no "do : until"?

Steve Lamb grey at despair.rpglink.com
Wed Jan 3 10:53:36 EST 2001


On Wed, 03 Jan 2001 14:45:29 GMT, Grant Edwards <grante at visi.com> wrote:
> if (whatever) {
>   do something;
>   do something else;
> } else {
>   yet another thing;
> }
  
>I simply can't read read code like that, and generally do an
>'indent -gnu' on it before I try to figure out what's going on...  

    I normally do a variation of this.

if (whatever) {
  do something;
  do something else;
}
else {
  yet another thing;
}

    This is so the ending brace is lined up with what it is ending.  The
{ else } in the middle of the K&R ruins that.  How does a } close a } !?!?!?
In the one I write we see an if closed and an else closed. 


-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list