Why There is No Do-While Loop in Python



PEP 315 (Python Enhancement Proposal) to include do..while statement has been rejected because it doen't fit in the general format of indented block statement: indented block used by every other Python compound statement. 

In words of Guido Van Rossum -  "Please reject the PEP. More variations along these lines won't make the language more elegant or easier to learn. They'd just save a few hasty folks some typing while making others who have to read/maintain their code wonder what it means".

Updated on: 2019-07-30T22:30:21+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements