[ZPT] Truncating strings (and more...)

Tino Wildenhain tino at wildenhain.de
Thu Oct 23 08:43:46 EDT 2003


Hi Charlie,

Charlie Clark wrote:
> On 2003-10-23 at 04:47:58 [+0200], Shane Hathaway wrote:
...

>>If the tools are not sufficient, why not improve the tools and let ZPT 
>>alone?
> 
> 
> Agree entirely. Maybe it's just another poor example but truncate isn't 
> necessary - just slicing the string [:10] does the trick. Extending ZPT / 
> TAL to do anything that is already possible in a Python expression is a bad 
> thing TM in my book as it violates the principle of "there being one and 
> preferably only one (obvious) way of doing things". Besides I'm sure 
> extending ZPT is just bound to make it slower than it already is. I know 
> that Tino is a great fan of CSS but in my experience there are too many 
> browsers out there that don't do all the latest and greatest CSS stuff and 
> expecting your clients to behave properly isn't always advisable.

Sure. CSS was just a sidenote. There are a lot of things which are
better solved with CSS instead of complicated HTML tricks.
However, with "tools" I was referring to Zope tools, maybe other
forms of python script objects, with more intelligent caching,
able to use as attribute or what not. Batch objects and such
come to my mind too.

Regards
Tino




More information about the ZPT mailing list