[Fredrik] > > X if C else Y > > hopefully, only one of Y or X is actually evaluated ?
Yes. From Guido's announcement at http://mail.python.org/pipermail/python-dev/2005-September/056846.html: > The syntax will be > > A if C else B > > This first evaluates C; if it is true, A is evaluated to give the > result, otherwise, B is evaluated to give the result. -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list