[Info] PEP 308 accepted - new conditional expressions
iddw at hotmail.com
Thu Oct 13 23:02:19 CEST 2005
On Thu, 13 Oct 2005 21:49:15 +0200, Piet van Oostrum <piet at cs.uu.nl>
>>>>>> iddw at hotmail.com (Dave Hansen) (DH) wrote:
>>DH> So lose the "if."
>>DH> R = C then A else B
>>DH> I don't think python uses the question mark for anything. Throw that
>>DH> in, if it makes parsing easier:
>>DH> R = C ? then A else B
>We have already had this discussion several times. I don't think it is
>going to add anything new to it. Besides after the BDFL has decided it is
Oh, agreed, most assuredly (except that "we" didn't include "me," not
that that would have made any difference, but I missed most of the
discussion). I was merely responding to your assertion that using "if
C then A else B" could cause parsing problems.
I'm not convinced python even needs a ternary operator. I just wish
the syntax chosen by the BDFL made more sense. Even if I don't use
it, I'll likely have to read it...
Change is inevitable, progress is not.
More information about the Python-list