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/2005-September/056838.html below:

[Python-Dev] Adding a conditional expression in Py3.0

[Python-Dev] Adding a conditional expression in Py3.0 [Python-Dev] Adding a conditional expression in Py3.0Terry Reedy tjreedy at udel.edu
Thu Sep 29 23:15:36 CEST 2005
"Guido van Rossum" <guido at python.org> wrote in message 
news:ca471dc2050929073236fae78c at mail.gmail.com...
> After all there's nothing wrong with and/or.

This is one reason 'no addition' got a relatively high rank in the vote.

Examples...
> telnet~1.py:        'DO' if cmd == DO else 'DONT',
versus                    cmd == DO and 'DO' or 'DONT'

I still stronly prefer this order and even slightly prefer this form.  I 
might even prefer a complete inversion of the order: x else y if c
                             'DO' else 'DONT' if cmd != DO
except that that does not chain at all well.

Terry J. Reedy



More information about the Python-Dev mailing list

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