for / while else doesn't make sense

Dan Sommers dan at tombstonezero.net
Tue Jun 7 08:27:49 EDT 2016


On Tue, 07 Jun 2016 00:53:31 -0700, Lawrence D’Oliveiro wrote:

> On Tuesday, June 7, 2016 at 3:34:39 PM UTC+12, Dan Sommers wrote:
> 
>> I used to write a lot of assembly code, for a lot of different CPUs, and
>> they all had a common, versatile looping form which could be arranged in
>> different ways to suit the problem at hand.  On most chips, it was (and
>> still is) called JMP.  The trouble began with multiple conditional
>> branching, call stack maintenance, and those other higher level
>> abstractions that made my assembly code so hard to follow.
> 
> You’ll notice I don’t use gotos in my code.

I notice plenty of break statements scattered throughout your loop
bodies.  Mixing the loop's exit conditions in with the logic is equally
unstructured.

> Next red-herring example, please...

I didn't say anything about a red-herring.  Please stick to the topic at
hand.



More information about the Python-list mailing list