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-January/001903.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?Fred L. Drake, Jr. fdrake@acm.org
Mon, 31 Jan 2000 12:08:11 -0500 (EST)
Ka-Ping Yee writes:
 > a scan through a decent chunk of Python would be useful to find out how
 > often this construct (in its "and"/"or" incarnation) actually gets used.

  I'm not sure what the survey provides other than a lower bound.  I
think most Python programmers who want the ?: functionality avoid the
and/or approach because of the ugliness.  I know I do.
  But I'd really like to have the functionality if the syntax is
reasonable!  I could live with something like "if cond then true else
false"; the leading "if" is visually important; without it, you have
to scan over the test expression to find the "then", and that makes it
harder to read.


  -Fred

--
Fred L. Drake, Jr.	  <fdrake at acm.org>
Corporation for National Research Initiatives



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