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/335538.html below:

[Info] PEP 308 accepted - new conditional expressions

[Info] PEP 308 accepted - new conditional expressions [Info] PEP 308 accepted - new conditional expressionsRichie Hindle rjh at cyberscience.com
Fri Sep 30 10:19:02 EDT 2005
[Fredrik]
> > X if C else Y
> 
> hopefully, only one of Y or X is actually evaluated ?

Yes.  From Guido's announcement at
http://mail.python.org/pipermail/python-dev/2005-September/056846.html:

> The syntax will be
> 
>     A if C else B
> 
> This first evaluates C; if it is true, A is evaluated to give the
> result, otherwise, B is evaluated to give the result.

-- 
Richie Hindle
richie at entrian.com

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