PEP-308 a "simplicity-first" alternative
Donnal Walter
donnal at donnal.net
Tue Feb 11 20:10:45 EST 2003
holger krekel wrote:
> I am still wondering if there is a simple way to fix the current
> ternary op "x and y or z". Everybody knows by now that
> this "fails" if y is a false value. Otherwise
> it works ok and is used in today's code everywhere.
>
> Inspired by "do the simplest thing that can possibly work"
> i now think that
>
> x and y else z
>
> might just do it and avoid the need for a new construct.
> It's a very minor change just for fixing the problem at hand.
> It should be obvious what it does.
+ 1
Donnal Walter
Arkansas Children's Hospital
More information about the Python-list
mailing list