No Do while/repeat until looping construct in python?

William Sonna wsonna at attglobal.net
Thu Mar 13 07:58:13 EST 2003


On Thu, 13 Mar 2003 08:42:11 +0100, Max M wrote:

> William Sonna wrote:
> 
>> Because the person(s) who decide the language refuse to face up to the
>> fact that they screwed up by not including it.  Its an obvious flaw
>> that dogma prevents from being corrected.
> 
> 
> What are you on about?
> 
> 
Subtitles, please :-)

> I have never had the need to use the do...while construct in all the
> years I have been using Python. Everything in the language is designed
> so that they fit with the while and the for loops.
> 
> 
> 
> 
> 
That says more about the way you solve problems than anything about the
language.  Can you seriously deny that there are a substantial number of
algorithims that involve one-or-more iterations?

It all comes down to whether or not one-or-more iterations is sufficiently
important to distinguish it from zero-or-more iterations.  Not only do
people who take the trouble to identify these constructs feel there is,
there is abundant precedent for this distinction in other areas of
software engineering.

If you choose NOT to make the distinction in your problem-solving
activities, there is nothing in C++, Java, etc., that says you must.  But
for those of us who do make such distinctions, the need to comment in
repeat loops is genuinely annoying, and not merely a superficial goof.

As a practical matter, I agree there are numerically far more
zero-or-more's than one-or-more's in the real world.  So despite the core
nature of this "feature", it has only a minor impact in day-to-day
activities.


> The language clicks with the features it has. Not a flaw at all!
> 
> 

I'm critical of this "feature" because I am willing to admit that the tool
isn't perfect, despite the fact that it is my personal choice for solving
many types of problems.

A flawed masterpiece IS still a masterpiece.




More information about the Python-list mailing list