----- Original Message -----
From: "Jaroslav Lukesh" <[EMAIL PROTECTED]>
To: "Garry Saddington" <[EMAIL PROTECTED]>; <zope@zope.org>
Sent: Monday, April 14, 2008 4:48 PM
Subject: Re: [Zope] type checking
<dtml-try>
<dtml-if "_.int(variable) = variable">
Variable is integer
<dtml-else>
Variable is not integer
</dtml-if>
<dtml-except>
Variable is not number
</dtml-try>
The 'same_type' function may be what you are looking for:
<dtml-if "_.same_type(a,[])">
a is a list
<dtml-elif "_.same_type(a,{})">
a is a dict
<dtml-elif etc>
</dtml-if>
Jonathan
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )