[ZPT] If/else?

Guido van Rossum guido@digicool.com
Wed, 09 May 2001 17:54:40 -0500


> Guido, Jim, and I just had a meeting in which we discussed this sort of
> thing.  I'm about to put the proposed changes that we came up with into the
> Wiki. With these changes you would write:
> 
> <div tal:replace="python:if(doChange(), ..., default)">
> 
> ...where 'default' is a new builtin variable that causes the default value
> to be left in place when it is returned.

...of course Evan meant

  <div tal:replace="python:cond(doChange(), ..., default)">

since 'if' is a Python reserved word. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)