14 Apr
2008
14 Apr
'08
10:43 p.m.
----- Original Message ----- From: "Jaroslav Lukesh" <lukesh@seznam.cz> To: "Garry Saddington" <garry@schoolteachers.co.uk>; <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