[stringtemplate-interest] Another: $x:{}$ when x=0

Terence Parr parrt at cs.usfca.edu
Fri Nov 21 12:04:50 PST 2008


On Nov 21, 2008, at 8:15 AM, Roman Odaisky wrote:

> Likewise, this is obviously erroneous:
>
>>>> st = StringTemplate("$x:{yes};null={no}$")
>>>> st["x"] = 0
>>>> print unicode(st)
> no
>
> Again those dynamic languages that don’t distinguish null, zero and  
> ""...

yep, should be yes since x is not null.

Ter


More information about the stringtemplate-interest mailing list