> Beside of this, is there a way to test if foo is a string or a
> sequence or whatever ??
apart from changing your form to force the list type, you could try 
(untested code):

<dtml-let checkbox="(checkbox==_.str(checkbox) and [checkbox] 
or checkbox">

There is no easy way to check whether a value in Zope is a list, 
tuple, or integer, but there is an easy way to check whether it is a 
string since strings are the only type left unchanged by the str 

More advanced type recognition generally requires trying various 
things and catching the exceptions that are raised. I have put a 
PythonMethod that does general type recognition in a HowTo at 

Duncan Booth                                             [EMAIL PROTECTED]
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to