Attention: cross post
PEP308 is concerned with the introduction of a ternary conditional operator (something like an "if cond: val_true else: val_false") into Zope.
In my view, such an operator would make TALES expressions easier because we could get rid of the "and/or" hack to represent conditionals and we could forget about the "test" function, which evaluates too eagerly.
Please have a look at PEP308 and consider voting. Details in "comp.lang.python.announce".
Dieter
IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a "not:.." expression, surely you can have an "if:..:then:..:else:.." expression. --Guido van Rossum (home page: http://www.python.org/~guido/)