Friday Finking: Contorted loops

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Sep 10 02:39:57 EDT 2021


On 10/09/21 11:47 am, Terry Reedy wrote:
> 2. It is rare useful.  For loops are common.  While loops are occasional 
> (nearly an order of magnitude less common than for loops.  Fractional 
> loop constructs are rare.

I would say that fractional loops are more common than loops
which truly need to execute completely at least once, and
aren't bugs waiting to be triggered by an edge case such as
empty input.

I seem to remember someone - maybe Wirth? - long ago expressing
the opinion that repeat-until loops often tended to be error
prone, but I can't provide a reference, sorry.

-- 
Greg



More information about the Python-list mailing list