[Petal] attributes question

Jean-Michel Hiver jhiver at mkdoc.com
Fri Jul 25 21:51:38 BST 2003


> You may already know this, but for the benefit of those who don't, TAL 
> does *not* treat the empty string (or zero, or any other false value) as 
> 'nothing'.  'nothing' is a singleton (Python None in our implementation) 
> specifically meant to be distinct from all string, integer, etc values. 
> It has the same effect as an empty string in some cases (tal:replace, 
> for instance) but not in tal:attributes.

That's interesting. In Petal, I had the most plain stupid implementation
of 'nothing': I didn't implement it. Of course this has the added twist
that you can redefine what 'nothing' is... so what :)

As a side effect, it is true that Petal will consider anything that is
not defined or an empty string to be 'nothing'. I think this is purely
an implementation issue and not a fundamental violation of TAL.

But you guys wrote the TAL spec (which is such a brilliant idea I truly 
wish I had it myself :))... so you tell me!

Cheers,
Jean-Michel.


More information about the Petal mailing list