[Python-Dev] "? operator in python"

Guido van Rossum guido at python.org
Wed Oct 26 18:21:55 CEST 2005


Dear Lucky,

You are correct. Python 2.5 will have a conditional operator. The
syntax will be different than C; it will look like this:

  (EXPR1 if TEST else EXPR2)

(which is the equivalent of TEST?EXPR1:EXPR2 in C). For more
information, see PEP 308 (http://www.python.org/peps/pep-0308.html).

Python 2.5 will be released some time next year; we hope to have
alphas available in the 2nd quarter. Thatr's about as firm as we can
currently be about the release date.

Enjoy,

--Guido van Rossum

On 10/25/05, Lucky Wankhede <lucky1010_studies at yahoo.co.in> wrote:
>
>
>  Dear sir,
>
>          I m a student of Computer Science Dept.
>  University Of Pune.(M.S.) (India). We are learning
> python as a course for our semester. Found its not
> only use full but heart touching laguage.
>
>           Sir , I have found that the python is going
> to have new feature, of "? " operator, same as in C
> languge.
>
>
>           Kindly provide me with the information that
> in version of python we will be able to find that
> feature and when it is about to realse.
>            Considering your best of sympathetic
> consideration. Hoping for early response.
>
>
>
>                  Thank You.
>
>
>                                 Mr. Lucky R. Wankhede
>                                 M.C,A, Ist,
>                                 Dept. Of Comp.
> Sciende,
>                                 University of Pune,
>                                 India.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list