conditional expressions (RE: Loop-and-a-half (Re: Curious assignment behaviour))

DeepBlue DeepBlue at DeepBlue.org
Mon Oct 15 09:38:42 EDT 2001


Tim
For some reason the thread on this topic started with your edited reply, and
I could not get anything earlier.  Maybe a problem with the news server I
use.
But I see your point now.  Apologies for the misunderstanding.
DB

"Tim Peters" <tim.one at home.com> wrote in message
news:mailman.1003113854.26899.python-list at python.org...
> [DeepBlue]
> > Much better:
> > x = if e1 then (e2) else (e3)
>
> You're apparently responding to an edited reply, and didn't read the
thread
> from its start:  surrounding parens are required else you don't get this
> form of conditional expression at all.  It's not a question of whether to
> require surrounding parens or not; the latter isn't an option, due to the
> limitations of one-token lookahead parsing (read the thread from the
start).
>






More information about the Python-list mailing list