PEP 308: A PEP Writer's Experience - PRO
Samuele Pedroni
pedronis at bluewin.ch
Sun Feb 9 11:05:56 EST 2003
"Andrew Koenig" <ark at research.att.com> ha scritto nel messaggio
news:yu997kc97a1p.fsf at europa.research.att.com...
> Fredrik> so when *you* fail to come up with examples that proves
> Fredrik> *your* point, it's my responsibility to provide them?
>
> Fredrik> are we playing "logical fallacies" bingo, or what?
>
> Not at all. For most small examples of the form ``I would rather
> write X than Y'' someone can come up with a retort of the form ``You
> should write Z instead.'' Such responses, although true, are
> irrelevant.
>
As you might know the "cutest" (my take) general solution to the problem in
current Python (performance aside), has been posted by
Gerald S. Williams to python-dev:
ife = lambda box: box[0]
z = ife(cond and [x] or [y])
if Python had had a ternary cond op, I would never have seen that <sniff>.
More information about the Python-list
mailing list