Brain storm failed Re: PEP 308

Roman Suzi rnd at onego.ru
Tue Feb 11 00:17:15 EST 2003


On Mon, 10 Feb 2003, Erik Max Francis wrote:

>Roman Suzi wrote:
>
>> I am sorry to observe that brain storm on good suggestion for "inline
>> if"
>> failed. This clearly says that time has not come for inline ifs.
>
>Whose brainstorm?  Yours?
>
>There has actually been a substantial amount of agreement in the pro-PEP
>camp.  Lots of them thought x if C else y was acceptable; lots also
>thought if C: x else: y was acceptable.

>100% of the pro-PEP people haven't agreed 100% on one form, but that
>hardly means that the brainstorm "failed" or that therefore the
>conditional operator's "time has not come."
>
>Why don't you save the BDFL decisions for the actual BDFL?

I do not decide for the BDFL. I've decided for myself. I see no reason to
contribute to PEP 308 as I am convinced inline if doesn't belong to Python, as
all proposed forms are much less than optimal. Next hope for inline if is lazy
evaluation (if it ever to be added to Python): then everybody will be able to
add "if" as a function treating it's arguments specially. But I do not believe
BDFL will ever add such function to Python, as it means more confusion. Even 
more likely "implicit lambda" proposal:

ifelse(cond, :YES, :NO)

== ifelse(cond, lambda: YES, lambda: NO)

will not probably be accepted... Anybody up to the PEP?

Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by Linux RedHat 7.3






More information about the Python-list mailing list