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/033116.html below:

[Python-Dev] Re: Trinary Operators

[Python-Dev] Re: Trinary Operators [Python-Dev] Re: Trinary OperatorsEric S. Raymond esr@thyrsus.com
Thu, 6 Feb 2003 15:13:04 -0500
Guido van Rossum <guido@python.org>:
> I'm not sure yet how lambda and if/else should group relative to each
> other.

I am.  Lambda should bind more loosely.

Consider the typical callback lambda usage case:

     MyGuiButton(lambda: mysort() if mode == SORT else browse(), "Do it.")

That is, I definitely want the scope of the lambda to go all the way to
the comma.

I like the suggestion for the extended n-ary form.  Partly because it's 
a stronger helper for the most important usage context, but also because
it moves Python more towards being an expression-oriented language.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>



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