PEP-308 a "simplicity-first" alternative
holger krekel
pyth at devel.trillke.net
Tue Feb 11 23:18:30 EST 2003
Sean Ross wrote:
> > > 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?
Sure. typo. sorry.
holger
More information about the Python-list
mailing list