10 Nov
1999
10 Nov
'99
3:31 p.m.
Christopher Petrilli wrote:
On 11/9/99 4:55 PM, David S. Harrison at dsh@magma-da.com wrote:
[snip]
<dtml-if "_.type(TAG)==_.type('x')">
Since I've hardly ever seen 'type' used *except* in this exact kind of construction, how about a standard namespace function: def same_type(a, b): return type(a) == type(b) which would allow <dtml-if "_.same_type(TAG, 'x')">. It could even be extended to fall back to meta_type on ExtensionClasses, but it's nice and simple as is. Cheers, Evan @ 4-am