PEP 308: Alternative conditional operator forms

Erik Max Francis max at
Tue Feb 11 08:46:09 CET 2003

Aahz wrote:

> Erik Max Francis wrote:
> > Aahz wrote:
> >
> > > No, that's not a short-circuiting form.
> >
> > Well, then it isn't PEP 308 alternative, and so doesn't belong on
> > the list.
> <shrug>  I believe it's an alternative; if you refuse to list it,
> you've
> got a guaranteed -1 from me.

Are you really saying that you're going to vote against a PEP because of
what _I_ do in a non-authoritative capacity?  I'm compiling a list for
my own edification and will present it to the community when the threads
die down; what goes into the PEP and/or any vote on syntax will be
decided by the community, not me.  I submit that you voting -1 because
of what _I_ do will reflect far more on yor behavior and ethics than on
mine -- particularly given that you have been clearly and vocally
predisposed against the PEP from the very beginning.

Read the updated text of PEP 308.  A non-short-circuiting function (in
this case, `cond') is specifically mentioned, and _explicitly rejected_
by the BDFL expressly because it does not short circuit:

      4.  Adopt a function without short-circuit behavior:
              cond(<condition>, <expression1>, <expression2>) 


      The fourth position is much more conservative.  Adding a new
      function, cond(), is trivially easy to implement and fits easily
      within the existing python model.  Users of older versions of
      Python will find it trivial to simulate.  The downside is that
      it does not provide the sought-after short-circuit
      evaluation (see the discussion below on the need for this).
      The bigger downside is that the BDFL opposes *any* solution that
      does not provide short circuit behavior.

The ?: form is also explicitly rejected in the PEP, and thus is also not
in my list of alternatives (this has been true from the very beginning,
and I've pointed it out a few times in this thread).  If you don't like
it, take it up with the BDFL.

Still going to vote -1 because of what _I_ do?

 Erik Max Francis / max at /
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ There I was / There I was / Splitting atoms with my desire
\__/ Lamya
    Computer science /
 A computer science reference.

More information about the Python-list mailing list