Re: [Zope] Retrieving type info from Request.Form items
Please continue to discuss in the mail list. On Fri, Oct 12, 2001 at 10:19:52AM -0400, Douwe Osinga wrote:
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. Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
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
participants (2)
-
Douwe Osinga -
Oleg Broytmann