[Fwd: Re: [Zope-dev] [Vote] PEP308 voting began]

Chris Withers chrisw@nipltd.com
Wed, 05 Mar 2003 14:54:03 +0000


I think this was for the list...

Chris

-------- Original Message --------
Subject: Re: [Zope-dev] [Vote] PEP308 voting began
Date: Wed, 05 Mar 2003 08:42:10 -0500
From: Brian Brinegar <brinegar@pier.ecn.purdue.edu>
To: Chris Withers <chrisw@nipltd.com>
References: <15972.64686.377126.329892@gargle.gargle.HOWL> 
<200303042023.h24KNuH27603@odiug.zope.com> <3E65F34D.8020701@nipltd.com>

Not sure if this applies, but lets say I have something like:

<div tal:repeat="item container/myList">
   <div class="selectedItem" tal:condition="item/isCurrent">Item 1</div>
   <div class="regularItem" tal:condition="not: item/isCurrent">Item 2</div>
</div>

When this is viewed outside of TAL, say by a designer in Dreamweaver,
both styles are apparent and their presentation can be changed by the
designer. Where something like this:

<div tal:repeat="item container/myList">
   <div class="selectedItem" tal:attributes="class ternary:
item/isCurrent: string: selectedItem | string: regularItem">Item</div>
</div>

would not include both versions of the presentation when viewed outside
of TAL. I've always assumed any kind of if/else combo would break the
change design after implementation aspect of page templates. However a
little extra work for designers saves a ton of duplication for
developers, so I think we should go with it. I also agree that it should
be an addition to TAL rather than using whatever python ends up with.
That's my few cents.

-Brian

Chris Withers wrote:

 > 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.
 >
 >
 > I think not: is dubious and I'd find if-then-else way over the lines...
 >
 > Chris
 >
 >
 > _______________________________________________
 > Zope-Dev maillist  -  Zope-Dev@zope.org
 > 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 )