[Zope] Retrieving type info from Request.Form items

Douwe Osinga dmo@oberon.nl
Mon, 15 Oct 2001 14:10:14 +0200


> > >   After converting objects are already of the specified type.
> If you ask
> > >for :int - you will get integer (not a string). No need to
> preserve type
> > >information.
> > Hi,
> >
> > Thanks for your quick answer. I suppose I won't need to get the type
> > information itself. But how do I find out what the type of the
> object is,
> > ie get a string I can pass to manage_addProperty as type parameter?
>
>    Ah, that's more trickier. Probably, Python builtin function "type()",
> but it is noot available in DTML - only in Products and External Methods.

Yes, type() doesn't work from ZClasses, where I need it. I'm pretty sure
there
is some kind of equivalent for type in Zope, but I can't remember where I
came
across it. Anybody else remember something? To test whether something was a
string you had to type something like if TypeOf(aThing)==TypeOf('dummy'):

Douwe