[Zope] What's the type of something marshalled to a "record"?
Dieter Maurer
dieter@handshake.de
Sat, 26 Jan 2002 21:49:16 +0100
Jean Jordaan writes:
> Short version of my question: how do I know when a form variable
> has been marshalled to a record? _.same_type(var, ????)
The form variables and their type are usually part of the actions interface.
Usually, you do not check whether the form designer used ":record"
or not, but you require him to do that.
Maybe because of this, there is no easy way to check
for "recordness". If you really want to check it, you can
create a record in an External Method and use "same_type":
(in an ExternalMethod):
from ZPublisher.HTTPRequest import record
def getRecordInstance():
'''return an empty 'record' instance.'''
return record()
Dieter