PEP 315: Enhanced While Loop

Ben Allfree benles at bldigital.com
Sat May 3 17:24:05 EDT 2003


> PEP syntax would work (if I understand it correctly):
> 
> do:
>     MakeMoney()
> while not Poor():
>     SpendMoney()

Hmm, that could be. I understood the PEP to say that the while condition was
tested after SpendMoney().

> 2) Making anything that Python programmers would "just have to understand"
> is
> not Pythonesque and should be avoided.

I agree that it should be clear or not implemented. I meant that as
programmers, Python programmers must understand the difference between a
pretest and a posttest. 

> I would vote for no change to the language before adding this confusing
> syntax
> to it or the alternative proposal.  If a clean, straightforward syntax can
> be
> created, great.  These seem to me to violate the Zen of Python.

I agree here also. Even the alternative I brought up is not that special and
I've always been content to use a while loop. In fact, it simplifies things
in a certain sense to know that there is only one open ended loop construct.







More information about the Python-list mailing list