SV: [ZPT] Yuk! Someone please improve on this...

Fred L. Drake, Jr. fdrake@acm.org
Mon, 10 Sep 2001 10:43:50 -0400


Chris Withers writes:
 > I also despise abusing python's 'or' like that,

  This is not abuse; we write code like this all the time.  The
resulting behavior is intentional.

 > it should have Guido turning in
 > his grave (if he were in one, which I hope he's not, unless he's secretly a
 > vampire ;-)

  First, you ask us if you should start sleeping with your sister, and
now you're considering that Guido might be a night-dweller?  Get some
help!

Phil Harris wrote:
 > <td tal:content="item/title | '&nbsp;'"/>

Chris Withers writes:
 > <!-- Page Template Diagnostics
 >  Compilation failed
 >  Products.PageTemplates.TALES.CompilerError: Invalid variable name "'&nbsp;'"

  Off the top of my head:

	<td tal:content="structure item/title | string:&nbsp;;" />

(Completely untested, of course!)


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation