main logo
Subject: Re: [ProPython] Fwd: [Info] PEP 308 accepted - new conditionalexpressions
Author: Kevin Cully
Posted: 2005/09/30 10:05:31
 
View Entire Thread
New Search


Wow. I think this change really increases the readability of that
command. Of course, I'm not really of a Pythonista mindset yet.

Kevin Cully
CULLY Technologies, LLC
kcully /AT/ cullytechnologies .D.O.T com
http://www.cullytechnologies.com



Peter Decker wrote:

>---------- Forwarded message ----------
>From: Reinhold Birkenfeld <reinhold-birkenfeld-nospam@wolke7.net>
>Date: Sep 30, 2005 9:09 AM
>Subject: [Info] PEP 308 accepted - new conditional expressions
>To: python-list /AT/ python .D.O.T org
>
>
>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)]
>
>or
>
>C and X or Y (only if X is True)
>
>Reinhold
>--
>http://mail.python.org/mailman/listinfo/python-list
>
>
>--
>
># p.d.
>
>
[excessive quoting removed by server]


 
©2005 Kevin Cully
<-- Prior Message New Search Next Message -->