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/056617.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.0Steven Bethard steven.bethard at gmail.com
Wed Sep 21 18:14:07 CEST 2005
Adam wrote:
> So looking at a few alternatives ...
>
[snip]
> (e ? (e1 ? a1 : b1) : (e2 ? a2 : b2))
>
[snip]
> (if e, (if e1, a1 else b1) else (if e2, a2 else b2))
>
[snip]
> (if e then (if e1 then a1 else b1) else (if e2 then a2 else b2))
>
[snip
> (e selects (e1 selects a1 else b1) else (e2 selects a2 else b2))
>
[snip]
> (e: (e1: a1 ? b1) ? (e2: a2 ? b2))
>
[snip]
> (e selects (e1 selects a1 ? b1) ? (e2 selects a2 ? b2))
>
[snip]
> (e selects (e1 selects a1, b1), (e2 selects a2, b2))
>

Please no more syntax proposals!  There were enough in the PEP.  It
looks like most people support a conditional expression of some sort. 
We need to leave the syntax to Guido.  We've already proved that like
the decorators discussions, we can't as a community agree on a syntax.
 That's what we have a BDFL for. =)

Steve
--
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy
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