A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-February/033131.html below:

[Python-Dev] Re: Trinary Operators

[Python-Dev] Re: Trinary Operators [Python-Dev] Re: Trinary OperatorsGary Herron gherron@islandtraining.com
Thu, 6 Feb 2003 14:23:02 -0800
On Thursday 06 February 2003 01:18 pm, Eric S. Raymond wrote:
> Gerald S. Williams <gsw@agere.com>:
> > In that case, the "inconsistency in form" is the order of
> > evaluation. The expression in the middle is evaluated,
> > then either the one on the left or the one on the right.
> > Not everyone will see this as a big issue, but it is a
> > potential source of confusion.
>
> Yeeeouch.  And the proposed n-ary form is even worse.

Not really all that bad.  Over all

  (e1 if c1   else   e2 if c2   else  e3)

proceeds left to right through each "en if cn" part.  Of course, the
order in each "en if cn" part is reversed, but you already had that in
the initial ternary form.

Gary Herron





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4