Commit Graph

26 Commits

Author SHA1 Message Date
Brett Cannon c33689e5ec Make Raymond Hettinger's name consistent. 2007-06-28 19:44:20 +00:00
Guido van Rossum df7a33afb0 PEP 308 is final. A great many thanks go to Thomas Wouters! 2006-02-27 16:55:05 +00:00
Guido van Rossum 3eed115841 Clarify the new syntax and note a backwards incompatibility. 2006-02-26 19:47:55 +00:00
Guido van Rossum fee56e59bb Rename PEP 308 to "Conditional Expressions". 2005-09-30 14:42:36 +00:00
David Goodger 805a4dd6cb fixed typo; added whitespace 2005-09-30 13:41:34 +00:00
Raymond Hettinger 14e9b49d96 Record pronouncement on conditional expressions. 2005-09-30 01:51:58 +00:00
Raymond Hettinger 83923d5309 Indicate the rejection of PEP 308 for an if-then-else expression. 2003-08-13 18:06:34 +00:00
Guido van Rossum fa6660b886 Avoid 'I' now there's more than one author. Other minor nits. 2003-02-13 15:01:53 +00:00
Raymond Hettinger a975337001 Amended the PEP to reflect some convergence on the newgroup:
* Listed the downsides of the current proposal.

* Listed why '<cond> then <expr1> else <expr2>' is starting to
   be preferred over '<cond> and <expr1> or <expr2>'.

* After BDFL comments, I withdrew my proposed c??a||b syntax
   and deleted the rejected c?a!b syntax.  The remaining
   punctuation based contender is c?a:b.

* After BDFL rejection of non-short-circuiting options,
   advocacy dropped sharply.  Removed it from the list of
   contenders.

The leading options on the table are:

*     (if <cond>: <expr1> else: <expr2>)
*     <cond> then <expr1> else <expr2>
*     <cond> ? <expr1> : <expr2>
*     no change
2003-02-13 06:59:58 +00:00
Raymond Hettinger 5ef89e80a2 Put variables in correct order. 2003-02-12 12:35:59 +00:00
Raymond Hettinger 400ec56439 Chris Tismer's proposal is also being well received. 2003-02-12 04:09:14 +00:00
Raymond Hettinger 578b6df698 * Add Holger's new, well-received idea.
* Fixed typo.
2003-02-12 01:38:25 +00:00
Guido van Rossum 85fb287b33 I just thought of something: now the syntax looks like if C:E1 else:E2,
we can also allow one or more elif parts.
2003-02-11 22:34:52 +00:00
Raymond Hettinger b3de48b5bb Several people requested that the parenthesis requirement be emphasized. 2003-02-11 19:48:20 +00:00
Guido van Rossum ef2c13772f Typo (foo -> good). 2003-02-11 15:53:20 +00:00
Guido van Rossum a192075d59 Minor nits. 2003-02-11 14:59:18 +00:00
Raymond Hettinger 294fd7ade7 Updated the PEP for GvR.
* Out of order evaluation is out of favor.
* So are ideas that do not provide for short-circuiting.
* (if <condition>: <expression1> else: <condition2>) is in vogue.
* <condition> ?? <expression1> || <expression2> is a new contender.
* cond(<condition>, <expression1>, <condition2>) is viable if implemented
      as a keyword and has short-circuit behavior.
* Added a summary of a few ideas from the last couple hundred posts
      from comp.lang.python.
2003-02-11 05:43:56 +00:00
David Goodger bbebe7226d fixed status 2003-02-09 05:12:54 +00:00
Guido van Rossum 52ef95d27a It is *right* associative! (The example was right. :-) 2003-02-08 13:40:52 +00:00
Guido van Rossum 717ec38a5c Add 'when' variant. 2003-02-08 02:12:43 +00:00
Guido van Rossum edf0585da8 Add and/or alternative and why it doesn't always work.
Correct origin of ?: and ?! again.
2003-02-08 00:56:13 +00:00
Guido van Rossum c486401240 Add if C : e1 else e2. 2003-02-07 22:34:54 +00:00
Guido van Rossum 648a2a5acc Explain that "e if C" (without the "else" part) is a bad idea. 2003-02-07 22:29:39 +00:00
Guido van Rossum 63a04aad2b Credit where credit is due. Also add an extra blank line before the
section on ifelse().
2003-02-07 22:13:53 +00:00
Skip Montanaro cd1746477e explain why adding a new builtin won't work. 2003-02-07 20:18:45 +00:00
Guido van Rossum a526eed9cb Add PEP 308: if-then-else expression proposal. 2003-02-07 17:03:31 +00:00