PEP308: Yet another syntax proposal

Andrew Dalke adalke at mindspring.com
Mon Feb 10 19:58:29 EST 2003


James J. Besemer:
> Doh.
>
> You silly.
>
> The POINT is that the example contains yet another glaring BUG.
>
> In trusted Python library code.

Glaring?  No.

With deep side effects?  No.

Would an if/else expression have prevented this error?  Possibly.
Though there will also be errors in an if/else expression.  And
this specific error type 1) would not exist were there an ifelse()
builtin function and 2) was apparantly found and fixed 8 months
ago.

> > On the other hand, it suggests that an if/else expression would
> > make for fewer mistakes caused by people with experience in
> > if/else from other languages.
>
> Yes, a forceful case.

No, a case.  I do not deny there are good uses of this PEP
proposal.  It's just that there are also consequences of this
expression which suggest that overall it is inappropriate for
Python.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list