PEP 308: Alternative conditional operator forms

Peter Hansen peter at engcorp.com
Mon Feb 10 13:12:32 EST 2003


Michele Simionato wrote:
> 
> Erik Max Francis <max at alcyone.com> wrote in message news:<3E46F0CE.5675E180 at alcyone.com>...
> > I'd like to build an exhaustive (or nearly so) of forms of the
> > conditional operator that have been made so far that people have thought
> > had _some_ merit (i.e., ones that were proposed and which someone other
> > than the proponent indicated they thought might be a good idea), and
> > those which Guido has not already absolutely dismissed (such as C ? x :
> > y).  I'd like to do this both for my own edification in seeing them all
> > in one place and for a potential second vote on the desired form (should
> > the process get that far, of course).  (I'm also putting aside for the
> > moment the issue of the introduction of new keywords or punctuation, or
> > the appearance of chained conditional operators.)
> >
> 
> Erik, thanks for offering your time to prepare the list. However, I think we
> should first make sure that there is a majority of Pythonistas favorable to
> the introduction of the ternary operator.  There is no point in arguing
> between us about the more pythonic solution if 80% of users are already
> against the ternary operator. 

I would think you could consider Erik's efforts to be focusing on
the secondary question of "how to do it", just for that potential
20% (which is likely larger, but that's another story) who do want
the ternary operator.

Don't stop someone who already knows he wants it from putting 
together a list that will help likeminded people agree on the
preferred syntax for that operator.

> I think there is a big majority not
> posting on c.l.p that could be contrary to the innovation and don't
> bother to sent verbose postings. I fear this majority could kill
> us at the voting moment (and maybe Guido counts on that).

"counts on that"?  That ascribes a somewhat underhanded approach
to this whole thing to someone who appeared to be very open and
upfront about the whole issue.  Or am I misinterpreting your comment?

I don't understand all the comments about who can be trusted
to manage the voting, who has ulterior motives, etc... this
isn't *that* big a deal, is it?  This is the discussion phase,
where people's opinions can be swayed (even repeatedly :-) and
some of the sillier arguments can be eliminated.  After the 
dust settles, either a consensus emerges, or the need to 
vote is clear and we can proceed to that step.  It doesn't
really seem we're there yet, to me.

-Peter




More information about the Python-list mailing list