[stringtemplate-interest] Problem in multivalued attribute handling?

Terence Parr parrt at cs.usfca.edu
Mon Jul 10 10:55:52 PDT 2006


On Jul 8, 2006, at 6:27 PM, Praki Prakash wrote:

> Terence,
>
> Thanks for the response. Allow me to say that your String Template  
> design is excellent and I hope it catches on.

It is rapidly gaining ground.  Last year at this time we had 200  
downloads a month...i believe it's 600/month now.

> As someone who has had to fix a ColdFusion based application with  
> absolutely no concept of model-view and their separation, I can see  
> how a well-defined template engine can prevent monstrosities being  
> created. StringTemplate is certainly a good example of less being  
> more!
>
> As far as my problem, Python's definition of True/False is below:
>
> In the context of Boolean operations, and also when expressions are  
> used by control flow statements, the following values are  
> interpreted as false: False, None, numeric zero of all types, and  
> empty strings and containers (including strings, tuples, lists,  
> dictionaries, sets and frozensets). All other values are  
> interpreted as true.

Hmm...should be only Boolean objects that are exceptions.  Anything  
else is "presence/absence"?

> The Pythonic way to explicitly check for non-existent values is "if  
> x is None:". My quick glance at the Python code seemed to contain  
> "if x:".

Any other Python folks wanna comment on IF processing?

Ter



More information about the stringtemplate-interest mailing list