Python as Guido Intended
apardon at forel.vub.ac.be
Mon Nov 28 11:22:57 CET 2005
Op 2005-11-28, Serge Orlov schreef <Serge.Orlov at gmail.com>:
> Antoon Pardon wrote:
>> No it wasn't. From what I have picked up, the ternary operator
>> was finaly introduced after one of the developers tripped over
>> the commonly used idiom to simulate a ternary operator, which
>> can fail in certain cases.
>> Anyway, when I was arguing for a ternary operator in python,
>> those who opposed me, certainly gave me the impression that
>> they thought I wanted to mangle the language, the mere idea
>> of a ternary operator was against the spirit of python.
>> When I argued for a more general loop construct similar
>> objections were made and the proposal was fiercely fought.
>> Someone even started a PEP, with the intention to bury
>> the idea. (That can be from before I argued for it)
>> Now I have read about both that they will be introduced in
>> Python 2.5 without a whisper of protest.
> Protesting BDFL is absolutely useless by definition even if you
> disagree. Tim Peters wanted generators for 10 years
> and he has much more power of convincing Guido than you. Why do you
> think your proposal should be immediately accepted?
I don't think that. I was just illustrating that using:
"That is unpythonic" isn't really an argument, because
things that were thought unpythonic before are now
accepted as the pythonic way.
> By the way, I don't see the features you mentioned neither in
> nor among PEPs. Perhaps they are not final?
There were people who annouced these features in this newsgroup
for version 2.5 with a rather clear titles and those from the
dev-list that frequent this newsgroup didn't protest.
Among the PEP's I see that at least PEP 308 is accepted.
So although it may not be implemented for version 2.5
a ternary operator is now an accepted as being pythonic.
More information about the Python-list