The method if_else would look like:

def if_else(c, a, b):
    if c:
        return a
    else:
        return b


I'm not expert in how python expression work, and hence don't know how to make python expressions aware about this method, but I'm sure it's possible, right?

This is possible. But, the problem remains that both a and b (in your example above) are evaluated.


The python syntax change, and the TALES syntax change, would mean that only one of a and b are evaluated.

--
Steve Alexander



_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to