[Info] PEP 308 accepted - new conditional expressions

Antoon Pardon apardon at forel.vub.ac.be
Mon Oct 3 07:22:37 EDT 2005


Op 2005-09-30, Sam schreef <sam at email-scan.com>:
> This is a MIME GnuPG-signed message.  If you see this text, it means that
> your E-mail or Usenet software does not support MIME signed messages.
> The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
> To open this message correctly you will need to install E-mail or Usenet
> software that supports modern Internet standards.
>
> --=_mimegpg-commodore.email-scan.com-32420-1128120829-0002
> Content-Type: text/plain; format=flowed; charset="US-ASCII"
> Content-Disposition: inline
> Content-Transfer-Encoding: 7bit
>
> 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?

Nothing, but afaiu Guido dislikes it.

-- 
Antoon Pardon



More information about the Python-list mailing list