Python paradigms

Emile van Sebille emile at fenx.com
Sun Apr 9 18:55:48 CEST 2000


This construct has been occasionally suggested
as one option:

>>> print ['falseresponse','truresponse'][1==2]
falseresponse
>>> print ['falseresponse','truresponse'][1==1]
truresponse

HTH,

Emile van Sebille
emile at fenx.com
-------------------


----- Original Message -----
From: Chuck Esterbrook <echuck at mindspring.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Saturday, April 08, 2000 7:00 PM
Subject: Re: Python paradigms


>
> I miss ?: and in fact, find myself writing extra if-else statements
because of it. I think ?: is a pretty natural construct.
>
> Maybe Python 3K....
>
> -Chuck
>
>
> --
> http://www.python.org/mailman/listinfo/python-list
>






More information about the Python-list mailing list