Guido van Rossum:

> I think I'd prefer (if <expr> then <expr> else <expre>)

In isolation, (if .. then ... else) is an improvement, but I'm
not sure it should be viewed in isolation.

At one point, you wanted to strengthen the distinction
between statements and expressions.  Is that still true?

    x = (if y then y.val else default)

    x = (if y:
             y.val
         else:
             default)

If any statement can become an expression, that could be very useful.
There are times when it would be convenient to just grab the newly
created function (def replacing lambda) or class, or the newly imported
module.  The distinction between exec and eval starts to look 
increasingly arbitrary as well.  

But if everything becomes expression-able, people *will* start to
use parentheses instead of indentation.  

-jJ
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to