[Zope-dev] [Vote] PEP308 voting began
Matthew T. Kromer
matt@zope.com
Tue, 04 Mar 2003 15:34:05 -0500
Guido van Rossum wrote:
>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/)
>
>
Yes, I'd be interested in seeing some kind of expression superset
operator in TALES such that you could use some boolean logic in
expressions which had subexpressions of different types (ie path
expressions vs python expressions). Currently the "punt" is to go out
to Python for any logic other than the path expression OR syntax.
e.g.
tal:define="variable tales: path: path_component | string: foo"
An inline if/else might be C like
tal:define="variable tales: local_var ? path: path_componenta :
string: foo"
where "tales:" is simply whatever the meta-expression handler name is.