[Python-checkins] python/nondist/peps pep-0000.txt, 1.249, 1.250 pep-0308.txt, 1.19, 1.20

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Wed Aug 13 12:06:36 EDT 2003


Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1:/tmp/cvs-serv13064

Modified Files:
	pep-0000.txt pep-0308.txt 
Log Message:
Indicate the rejection of PEP 308 for an if-then-else expression.



Index: pep-0000.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
retrieving revision 1.249
retrieving revision 1.250
diff -C2 -d -r1.249 -r1.250
*** pep-0000.txt	29 Jul 2003 04:43:29 -0000	1.249
--- pep-0000.txt	13 Aug 2003 18:06:34 -0000	1.250
***************
*** 110,114 ****
   S   305  CSV File API                                 Montanaro, et al
   S   307  Extensions to the pickle protocol            GvR, Peters
-  S   308  If-then-else expression                      GvR, Hettinger
   S   309  Built-in Curry Type                          Harris
   S   310  Reliable Acquisition/Release Pairs           Hudson, Moore
--- 110,113 ----
***************
*** 185,188 ****
--- 184,188 ----
   SR  289  Generator Comprehensions                     Hettinger
   SR  295  Interpretation of multiline string constants Koltsov
+  SR  308  If-then-else expression                      GvR, Hettinger
   SD  316  Programming by Contract for Python           Way
   SR  317  Eliminate Implicit Exception Instantiation   Taschuk
***************
*** 321,325 ****
   I   306  How to Change Python's Grammar               Hudson
   S   307  Extensions to the pickle protocol            GvR, Peters
!  S   308  If-then-else expression                      GvR, Hettinger
   S   309  Built-in Curry Type                          Harris
   S   310  Reliable Acquisition/Release Pairs           Hudson, Moore
--- 321,325 ----
   I   306  How to Change Python's Grammar               Hudson
   S   307  Extensions to the pickle protocol            GvR, Peters
!  SR  308  If-then-else expression                      GvR, Hettinger
   S   309  Built-in Curry Type                          Harris
   S   310  Reliable Acquisition/Release Pairs           Hudson, Moore

Index: pep-0308.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0308.txt,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** pep-0308.txt	13 Feb 2003 15:01:53 -0000	1.19
--- pep-0308.txt	13 Aug 2003 18:06:34 -0000	1.20
***************
*** 4,8 ****
  Last-Modified: $Date$
  Author: Guido van Rossum, Raymond D. Hettinger
! Status: Draft
  Type: Standards Track
  Content-Type: text/plain
--- 4,8 ----
  Last-Modified: $Date$
  Author: Guido van Rossum, Raymond D. Hettinger
! Status: Rejected
  Type: Standards Track
  Content-Type: text/plain
***************
*** 31,34 ****
--- 31,41 ----
      discussion, and a discussion of short-circuit behavior.
  
+     Following the discussion, a vote was held.  While there was an overall
+     interest in having some form of if-then-else expressions, no one
+     format was able to draw majority support.  Accordingly, the PEP was
+     rejected due to the lack of an overwhelming majority for change.
+     Also, a Python design principle has been to prefer the status quo
+     whenever there are doubts about which path to take.
+ 
  
  Proposal
***************
*** 236,239 ****
--- 243,371 ----
      The BDFL's position is that short-circuit behavior is essential
      for an if-then-else construct to be added to the language.
+ 
+ 
+ Detailed Results of Voting
+ 
+ 
+     Votes rejecting all options:  82
+     Votes with rank ordering:     436
+                                   ---
+     Total votes received:         518
+ 
+ 
+             ACCEPT                  REJECT                  TOTAL
+             ---------------------   ---------------------   -----
+             Rank1   Rank2   Rank3   Rank1   Rank2   Rank3
+     Letter  
+     A       51      33      19      18      20      20      161
+     B       45      46      21      9       24      23      168
+     C       94      54      29      20      20      18      235
+     D       71      40      31      5       28      31      206
+     E       7       7       10              3       5       32
+     F       14      19      10              7       17      67
+     G       7       6       10      1       2       4       30
+     H       20      22      17      4       10      25      98
+     I       16      20      9       5       5       20      75
+     J       6       17      5       1               10      39
+     K       1               6               4       13      24
+     L               1       2               3       3       9
+     M       7       3       4       2       5       11      32
+     N               2       3               4       2       11
+     O       1       6       5       1       4       9       26
+     P       5       3       6       1       5       7       27
+     Q       18      7       15      6       5       11      62
+     Z                                               1       1
+             ---     ---     ---     ---     ---     ---     ----
+     Total   363     286     202     73      149     230     1303
+     RejectAll                       82      82      82      246
+             ---     ---     ---     ---     ---     ---     ----
+     Total   363     286     202     155     231     312     1549
+ 
+ 
+     CHOICE KEY
+     ----------
+     A.  x if C else y
+     B.  if C then x else y
+     C.  (if C: x else: y)
+     D.  C ? x : y
+     E.  C ? x ! y
+     F.  cond(C, x, y)
+     G.  C ?? x || y
+     H.  C then x else y
+     I.  x when C else y
+     J.  C ? x else y
+     K.  C -> x else y
+     L.  C -> (x, y)
+     M.  [x if C else y]
+     N.  ifelse C: x else y
+     O.  <if C then x else y>
+     P.  C and x else y
+     Q.  any write-in vote
+ 
+ 
+     Detail for write-in votes and their ranking:
+     --------------------------------------------
+     3:  Q reject y x C elsethenif
+     2:  Q accept (C ? x ! y)
+     3:  Q reject ...
+     3:  Q accept  ? C : x : y
+     3:  Q accept (x if C, y otherwise)
+     3:  Q reject ...
+     3:  Q reject NONE
+     1:  Q accept   select : (<c1> : <val1>; [<cx> : <valx>; ]* elseval)
+     2:  Q reject if C: t else: f
+     3:  Q accept C selects x else y
+     2:  Q accept iff(C, x, y)    # "if-function"
+     1:  Q accept (y, x)[C]
+     1:  Q accept          C true: x false: y
+     3:  Q accept          C then: x else: y
+     3:  Q reject
+     3:  Q accept (if C: x elif C2: y else: z)
+     3:  Q accept C -> x : y
+     1:  Q accept  x (if C), y
+     1:  Q accept if c: x else: y
+     3:  Q accept (c).{True:1, False:2}
+     2:  Q accept if c: x else: y
+     3:  Q accept (c).{True:1, False:2}
+     3:  Q accept if C: x else y
+     1:  Q accept  (x if C else y)
+     1:  Q accept ifelse(C, x, y)
+     2:  Q reject x or y <- C
+     1:  Q accept (C ? x : y) required parens
+     1:  Q accept  iif(C, x, y)
+     1:  Q accept ?(C, x, y)
+     1:  Q accept switch-case
+     2:  Q accept multi-line if/else
+     1:  Q accept C: x else: y
+     2:  Q accept (C): x else: y
+     3:  Q accept if C: x else: y
+     1:  Q accept     x if C, else y
+     1:  Q reject choice: c1->a; c2->b; ...; z
+     3:  Q accept [if C then x else y]
+     3:  Q reject no other choice has x as the first element
+     1:  Q accept (x,y) ? C
+     3:  Q accept x if C else y (The "else y" being optional)
+     1:  Q accept (C ? x , y)
+     1:  Q accept  any outcome (i.e form or plain rejection) from a usability study
+     1:  Q reject (x if C else y)
+     1:  Q accept  (x if C else y)
+     2:  Q reject   NONE
+     3:  Q reject   NONE
+     3:  Q accept  (C ? x else y)
+     3:  Q accept  x when C else y
+     2:  Q accept  (x if C else y)
+     2:  Q accept cond(C1, x1, C2, x2, C3, x3,...)
+     1:  Q accept  (if C1: x elif C2: y else: z)
+     1:  Q reject cond(C, :x, :y)
+     3:  Q accept  (C and [x] or [y])[0]
+     2:  Q reject
+     3:  Q reject
+     3:  Q reject all else
+     1:  Q reject no-change
+     3:  Q reject deliberately omitted as I have no interest in any other proposal
+     2:  Q reject (C then x else Y)
+     1:  Q accept       if C: x else: y
+     1:  Q reject (if C then x else y)
+     3:  Q reject C?(x, y)
  
  





More information about the Python-checkins mailing list