From pep308vote@hotmail.com Sun Mar 2 10:27:15 2003 From: pep308vote@hotmail.com (Raymond Hettinger) Date: 2 Mar 2003 02:27:15 -0800 Subject: Vote on PEP 308: Ternary Operator Message-ID: BASICS ------ Vote by email no later than Noon (EST) on Sunday, March 9, 2003. Use the following format: To: pep308vote@hotmail.com Subject: PEP308 From: Line 1: Line 2: Line 3: Line 4: Line 5: Line 6: Line 7: Line 8: Line 9: 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. 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. SAMPLE BALLOT ------------- 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)) RATIONALE AND PROCESS --------------------- 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. EXCEPTION HANDLING ------------------ 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 From gerald@vamphq.com Sun Mar 2 16:07:39 2003 From: gerald@vamphq.com (Gerald Bauer) Date: 2 Mar 2003 08:07:39 -0800 Subject: Python and XUL: Luxor XUL Python Example Suite Released Message-ID: The Luxor XUL (XML User Interface Language) Python example suite is now available and includes a mini calculator, a channel surfer, a counter and more. Grab a copy at http://sourceforge.net/project/showfiles.php?group_id=28946 (look for the luxor-python-examples package). Here's a sneak preview: counter.xul: ================================