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/2001-October/017967.html below:

[Python-Dev] conditional expressions?

[Python-Dev] conditional expressions? [Python-Dev] conditional expressions?Paul Prescod paul@ActiveState.com
Tue, 16 Oct 2001 03:13:35 -0700
Tim Peters wrote:
> 
> ...
> 
> I was its only fan within PythonLabs, and I was lukewarm.  The trick is to
> view "if c else" as a new short-circuiting infix binary operator (for each
> c), and then it makes great-- even elegant --sense.  But it's apparently a
> major strain to see it that way.  It had at least one sworn mortal enemy,
> and I think Fred Drake was so upset at the idea that he couldn't speak.

It actually read more easily to me the first time. As I said on
python-list:

unit is meters if metric, else feet

versus

unit is, if metric, meters, else feet

At first I didn't like that it split the two options but I think that
that actually helps you to keep clear in your head what the "default" is
and what the "alternative" is.

 Paul Prescod



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