PEP 308: Alternative conditional operator forms -- Corner Case solved

Dave Brueck dave at pythonapocrypha.com
Wed Feb 12 18:30:52 EST 2003


On Wed, 12 Feb 2003, Bengt Richter wrote:

> On Wed, 12 Feb 2003 09:27:47 -0800 (PST), Dave Brueck <dave at pythonapocrypha.com> wrote:
>
> >Just bear in mind that "do nothing" also means "stay with the current
> >idiom that in some cases doesn't work" (yeah, you can hear my bias in that
> >statement ;-) ).
> >
> The current idiom can be made to work if we can mark the troublesome term
> so that it will be treated as True in the logical expression, but will retain
> its value. I am proposing {x} to mean treat x as true that way.

Yes, I've been following that discussion too, but I'm in the camp that
says 'and' doesn't readily imply anything about choosing between two
things anyway, so I'm not keen on building on the current idiom at all.

-Dave





More information about the Python-list mailing list