the_drow the_drow - 1 month ago 7
Python Question

Why isn't there a do while flow control statement in python?

Is there a good reason why there isn't a do while flow control statement in python?

Why do people have to write

while
and
break
explicitly?

Answer

It has been proposed in PEP 315 but hasn't been implemented because nobody has come up with a syntax that's clearer than the while True with an inner if-break.