Newbie help - test for data type

Bruno Desthuilliers onurb at xiludom.gro
Mon Jul 31 05:45:04 EDT 2006


John Machin wrote:
> Jonathan Bowlas wrote:
>> Hi Listers,
>>
>> I have a requirement to test for a data type could someone tell me if this
>> is possible in python?
>>
>> Basically I have a ZPT in Zope that users can select checkboxes in a form
>> which pass arguments for a python function, however if there is only one
>> checkbox selected it is passed as a string whereas more than one checkbox is
>> passed as a list.
>>
> 
> Fantastic. If there are 0 checkboxes selected, does it return None?

If no checkbox is selected, then the control is not successful and it's
name should not appear in the request. This is defined in the html spec
 (sections 17.2 and 17.13.2 of html 4.01 spec).


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list