PEP-308 a "simplicity-first" alternative
Sean Ross
sross at connectmail.carleton.ca
Tue Feb 11 22:17:16 EST 2003
> > holger krekel wrote:
> >
> >
> >>Inspired by "do the simplest thing that can possibly work"
> >>i now think that
> >>
> >> x and y else z
>>
Hi. I'm okay with this syntax (provided 'x then y else z' is unacceptable),
however I am a bit confused by the explanation.
> >
> > if 'x' is true then 'y' is the result. Else 'y' is the
>> result. So it doesn't matter if 'y' has a false value.
>>
In particular, I don't quite get "Else 'y' is the result". Wouldn't you want
'z' to be the result when 'x' is false?
Sorry, I must be missing something. Could someone explain exactly how and
why this proposal works?
Thanks
Sean
More information about the Python-list
mailing list