Steve Alexander wrote:
> This is possible. But, the problem remains that both a and b (in your
> example above) are evaluated.
I don't see the problem with that, unless a or b actually do stuff, and
modify stuff, and if it does, in ZPT it should then be put into a
script, since the template itself shouldn't contain any business logic.
I can see the use of a one-line if-else syntax in ZPT as a way to set an
attribute without making a specific pythons script just for such a small
piece of code, and this will do it.
If you want to *DO* different stuff depending on a condition, that
shouldn't be in the template.
Also, Evan tells me that this already exists in python: expressions, and
is called test(). So, problem solved, no additional uglyfication of
Python is needed. :)
_______________________________________________
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 )
- [Zope-dev] [Vote] PEP308 voting began Dieter Maurer
- Re: [Zope-dev] [Vote] PEP308 voting began Guido van Rossum
- Re: [Zope-dev] [Vote] PEP308 voting began Matthew T. Kromer
- [Zope-dev] Re: [Vote] PEP308 voting began Evan Simpson
- Re: [Zope-dev] Re: [Vote] PEP308 voting be... Paul Winkler
- [Zope-dev] Re: [Vote] PEP308 voting began Godefroid Chapelle
- Re: [Zope-dev] Re: [Vote] PEP308 voting be... Steve Alexander
- Re: [Zope-dev] Re: [Vote] PEP308 votin... Joachim Werner
- Re: [Zope-dev] Re: [Vote] PEP308 ... Lennart Regebro
- Re: [Zope-dev] Re: [Vote] PEP... Steve Alexander
- Re: [Zope-dev] Re: [Vote]... Lennart Regebro
- Re: [Zope-dev] Re: [Vote] PEP... Dieter Maurer
- Re: [Zope-dev] Re: [Vote] PEP308 ... Paul Winkler
- Re: [Zope-dev] Re: [Vote] PEP... Chris Withers
- Re: [Zope-dev] [Vote] PEP308 voting began Chris Withers
- Re: [Zope-dev] [Vote] PEP308 voting began Florent Guillaume
- Re: [Zope-dev] [Vote] PEP308 voting began Dan L. Pierson
- Re: [Zope-dev] [Vote] PEP308 voting began Dieter Maurer