The Set class is accessible via the formencode.validators module.
This way the result will always be a list, even if there's only one result. It's equivalent to ForEach(convertToList=True).
If you give use_set=True, then it will return an actual sets.Set object.
>>> Set.to_python(None)
[]
>>> Set.to_python('this')
['this']
>>> Set.to_python(('this', 'that'))
['this', 'that']
>>> s = Set(use_set=True)
>>> s.to_python(None)
Set([])
>>> s.to_python('this')
Set(['this'])
>>> s.to_python(('this',))
Set(['this'])
Messages
See the source for more information.