PEP 308: I liked the original proposal better

Mel Wilson mwilson at the-wire.com
Fri Feb 14 08:53:22 EST 2003


In article <mailman.1045199224.19020.python-list at python.org>,
Andrew Bennetts <andrew-pythonlist at puzzling.org> wrote:
>On Fri, Feb 14, 2003 at 12:56:39PM +0800, Simon Wittber (Maptek) wrote:
>>
>> Greg Ewing wrote:
>>
>> >I'd like to put in a plea for re-instatement of the original proposal
>> >
>> >    x if C else y
>> >
>> >which I found to be particularly elegant.
>>
>> I have to agree. From my point of view this is the most pythonic
>> solution.
>>
>> Yes, the test is in the middle of the expression. The argument "This is
>> not the way other languages do ternary expressions" is not a valid
>> argument against its use. Python is about about doing things the Right
>> Way, not the common accepted way.
>
>Sure, but the Python I know also tends to be about doing things the
>Left-to-Right way ;)

How do you program Python without assignment statements?

        Mel.




More information about the Python-list mailing list