A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/320739.html below:

[Info] PEP 308 accepted - new conditional expressions

[Info] PEP 308 accepted - new conditional expressions [Info] PEP 308 accepted - new conditional expressionsJaime Wyant programmer.py at gmail.com
Fri Sep 30 19:05:15 EDT 2005
On 9/30/05, Sam <sam at email-scan.com> wrote:
> Reinhold Birkenfeld writes:
>
> > Hi,
> >
> > after Guido's pronouncement yesterday, in one of the next versions of Python
> > there will be a conditional expression with the following syntax:
> >
> > X if C else Y
> >
> > which is the same as today's
> >
> > (Y, X)[bool(C)]
>
> What's wrong with "C ? X:Y"?
>
> Aside from ":" being overloaded?
>

First thing that comes to my mind is that it is more C-ish (read
cryptic) than pythonic (read elegant and understandable).

jw

More information about the Python-list 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