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/2000-February/001937.html below:

[Python-Dev] Adding C ternary select (a?b:c) to Python?

[Python-Dev] Adding C ternary select (a?b:c) to Python? [Python-Dev] Adding C ternary select (a?b:c) to Python?Gordon McMillan gmcm@hypernet.com
Tue, 1 Feb 2000 11:53:30 -0500
Fred L. Drake, Jr. writes:
> Greg Stein writes:
>  > p.s. I'm against a ternary operator. use an if/else statement. use
>  > def instead of lambda (lambda is the only rational basis given so far to
>  > add the operator, but it is bogus to start with)
> 
>   Actually, the places I'd use it most would be probably be in
> constructing parameters to string formatting operations.  Grepping
> back in my memory, that's usually where I've wanted it.

Boy does that ring a big bell. Was ambivalent, now I'm all for it 
(either C syntax or "then" syntax, don't care).

>   I very rarely use lambda, and usually change it on the next
> iteration on those cases when I do.

Use them mostly in GUIs where no smarts are required.

- Gordon



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