Why there is not 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: 30-Jul-2019

942 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements