Vote on PEP 308: Ternary Operator

Raymond Hettinger pep308vote at
Sun Mar 2 11:25:46 CET 2003

Vote by email no later than Noon (EST) on Sunday, March 9, 2003.
Use the following format:

  To:       pep308vote at
  Subject:  PEP308
  From:     <valid email address>
  Line 1:   <letter of most preferred format> <accept or reject> <format>
  Line 2:   <letter of second best format> <accept or reject>  <format>
  Line 3:   <letter of third best format>  <accept or reject>  <format>
  Line 4:   <full name of voter>
  Line 5:    <example 1>
  Line 6:    <example 2>
  Line 7:    <example 3>
  Line 8:    <example 4>
  Line 9:    <example 5>

Every line is required.
The published results will only include lines 1, 2, 3, and 4.
Note, that means your name is published.
You can use a fake name but a real name is preferred.

The email address is used for:
    assuring only one vote per address.
    notification of an improperly formatted ballot.
    resolving any questions that arise about the vote process.

Write-out these five examples using your most preferred syntax:
    x = "door" + (if quantity>1: "s" else: "")
    data = (if hasattr(s, 'open'): s.readlines() else: s.split())
    z = 1.0 + (if abs(z) < .0001:  0 else: z)
    t = v[index] = (if t<=0: t-1.0 else: -sigma /(t + 1.0))
    return (if len(s)<10: insertsort(s) else: quicksort(s))
Note, the examples are required but will not be used.
Try to get them right, but it is okay if they are wrong.

Marking accept means that you prefer this format over no-change.
Marking reject means that you prefer no-change, but if there is
one, then the marked choice would be the best one.

CHOICES (taken from Erik Max Francis's posting of seconded choices)
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

Note 1:  All of these options have short-circuit behavior.
That means that cond(C,x,y) would be a special syntax.

Note 2:  All options are eligible.  If the PEP notes that a proposal
had been rejected at some point, then consider it revived.

C accept  (if c: x else: y)
D reject  c ? a : b
H reject  c then a else b
John Jones
x = "door" + (if quantity>1: "s" else: "")
data = (if hasattr(s, 'open'): s.readlines() else: s.split())
z = 1.0 + (if abs(z) < .0001:  0 else: z)
t = v[index] = (if t<=0: t-1.0 else: -sigma /(t + 1.0))
return (if len(s)<10: linsort(s) else: qsort(s))

In the end, only Guido's vote counts. The purpose of the voting is
to provide him with information about how the community feels.

The goal of collecting preferences along with accept/rejects is to
allow everyone (including those who prefer the status quo) to
also be able to express which syntax they find least objectionable.
The end result is that Guido will know which is the most preferred
syntax AND the how much it is preferred to the status quo.

The purpose of publishing both names and the votes is to provide
assurance that the process is honest.  Also, I think that people
are more careful in their voting if they publicly take a position.
However, if someone wants to vote in secret, they are welcome to
use a pseudonym; at least, they will see their chosen name on the
tally and know their vote was counted.

The purpose of the examples section is voter education.  This
provides some assurance that each voter has at least tried
their own preferred syntax.

If there is a dispute, I'll ask Laura Creighton to resolve it.
Her decision will be final.

If I messed-up the ballot, I will repost a correction.

If the email account fails, I will open a new one and extend
the voting by a day.

If you make a mistake or change your mind, you may re-submit
your vote and the previous vote will be thrown out.

If there are any questions or discussion, please use the newsgroup.
The email address listed above is only for ballots.

Vote Early.  Vote Once.

Raymond Hettinger

More information about the Python-list mailing list