[Python-checkins] peps: Restore comment about an alternative syntax found in 2009

lukasz.langa python-checkins at python.org
Thu Jun 27 10:48:37 CEST 2013


http://hg.python.org/peps/rev/883ab7d71550
changeset:   4965:883ab7d71550
user:        Łukasz Langa <lukasz at langa.pl>
date:        Thu Jun 27 10:48:28 2013 +0200
summary:
  Restore comment about an alternative syntax found in 2009

files:
  pep-0315.txt |  11 +++++++++--
  1 files changed, 9 insertions(+), 2 deletions(-)


diff --git a/pep-0315.txt b/pep-0315.txt
--- a/pep-0315.txt
+++ b/pep-0315.txt
@@ -37,8 +37,15 @@
                 break
             <loop body>
 
-    Users of the language are advised to use that form when a do-while
-    loop would have been appropriate.
+    A syntax alternative to the one proposed in the PEP was found for
+    a basic do-while loop but it gained little support because the
+    condition was at the top:
+
+        do ... while <cond>:
+            <loop body>
+
+    Users of the language are advised to use the while-True form with
+    an inner if-break when a do-while loop would have been appropriate.
 
 
 Motivation

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list