[Python-ideas] Updating PEP 315: do-while loops

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Apr 26 12:18:16 CEST 2009


I like the structure of the exising PEP 315 proposal, but
not the selection of keywords. It seems confused -- what
exactly are you repeating? The part after the "do", the
part after the "while", or both?

My suggestion is

   while:
     <statements>
   gives <condition>:
     <more statements>

There could also be a degenerate form without
the second suite:

   while:
     <statements>
   gives <condition>

-- 
Greg




More information about the Python-ideas mailing list