[Python-checkins] python/nondist/peps pep-0000.txt, 1.325, 1.326 pep-0315.txt, 1.1, 1.2

rhettinger@users.sourceforge.net rhettinger at users.sourceforge.net
Sat Jun 18 08:21:39 CEST 2005


Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16944

Modified Files:
	pep-0000.txt pep-0315.txt 
Log Message:
Pick-up responsibility for PEP 315 (per agreement with Isaac Carroll).

Correct the semantics for continue statements found in the do suite.
The previous semantics did not match that for do-while statements in
other languages.



Index: pep-0000.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -d -r1.325 -r1.326
--- pep-0000.txt	17 Jun 2005 22:19:41 -0000	1.325
+++ pep-0000.txt	18 Jun 2005 06:21:36 -0000	1.326
@@ -93,7 +93,7 @@
  S   304  Controlling Generation of Bytecode Files     Montanaro
  S   310  Reliable Acquisition/Release Pairs           Hudson, Moore
  S   314  Metadata for Python Software Packages v1.1   Kuchling
- S   315  Enhanced While Loop                          Carroll
+ S   315  Enhanced While Loop                          Carroll, Hettinger
  S   319  Python Synchronize/Asynchronize Block        Pelletier
  S   321  Date/Time Parsing and Formatting             Kuchling
  S   323  Copyable Iterators                           Martelli
@@ -356,7 +356,7 @@
  SD  312  Simple Implicit Lambda                       Suzi, Martelli
  SR  313  Adding Roman Numeral Literals to Python      Meyer
  S   314  Metadata for Python Software Packages v1.1   Kuchling
- S   315  Enhanced While Loop                          Carroll
+ S   315  Enhanced While Loop                          Carroll, Hettinger
  SD  316  Programming by Contract for Python           Way
  SR  317  Eliminate Implicit Exception Instantiation   Taschuk
  SF  318  Decorators for Functions and Methods         Smith, et al

Index: pep-0315.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0315.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pep-0315.txt	2 May 2003 22:53:32 -0000	1.1
+++ pep-0315.txt	18 Jun 2005 06:21:36 -0000	1.2
@@ -2,12 +2,13 @@
 Title: Enhanced While Loop
 Version: $Revision$
 Last-Modified: $Date$
-Author: W Isaac Carroll <icarroll at pobox.com>
+Author: W Isaac Carroll <icarroll at pobox.com>
+        Raymond Hettinger <python at rcn.com>
 Status: Draft
 Type: Standards Track
 Content-Type: text/plain
 Created: 25-Apr-2003
-Python-Version: 2.4
+Python-Version: 2.5
 Post-History:
 
 
@@ -90,11 +91,16 @@
     without evaluating the loop condition or executing the else
     clause.
 
-    A continue statement in the do-while loop will behave somewhat
-    differently than in the standard while loop.  Instead of jumping
-    back to the loop condition, it will jump to the beginning of the
-    first suite of the loop.  This is to ensure that the setup code
-    has a chance to do its job before the condition is evaluated.
+    A continue statement in the do-while loop jumps to the while
+    condition check.
+
+    In general, when the while suite is empty (a pass statement),
+    the do-while loop and break and continue statements should match
+    the semantics of do-while in other languages.
+
+    Likewise, when the do suite is empty, the do-while loop and
+    break and continue statements should match behavior found
+    in regular while loops.
 
 
 Future Statement



More information about the Python-checkins mailing list