PEP-0315--Enhanced While Loop: An idea for an alternative syntax

Paul Rubin http
Wed Feb 18 21:09:22 CET 2004


"Andrew Koenig" <ark at acm.org> writes:
> I think that reserving "break" for abnormal situations makes
> programs easier to understand.  

Nah, abnormal conditions are what "raise" is for.

> Therefore, I would like a way of saying that I expect the normal
> exit (or exits) from the loop to be in the middle.  Whether you
> consider this desire to be part of the real world is up to you.

But just looking at those code samples, they're either harder to
understand than using break, or else easily replaced by some other
construct.  Is there a middle ground?  Maybe, but I haven't seen a
concrete example yet.



More information about the Python-list mailing list