I wrote:
> I must admit, for the common case, 'commify' is a lot simpler and 
> shorter to type, so maybe we could put that in too?

This works:

  [% MACRO commify(n) GET n.chunk(-3).join(',') %]

  [% commify(1234567) %]   # 1,234,567

:-)

Now all we need is to be able to do this:

  [% MACRO tt.item.commify GET n.chunk(-3).join(', ') %]

so that it becomes a scalar (item) virtual method and then we would
be able to do this:

  [% big_number.commify %]

That would be nice.

A



Reply via email to