Skip to content

Instantly share code, notes, and snippets.

@ianjosephwilson
Created January 27, 2013 23:04
Show Gist options
  • Save ianjosephwilson/4651147 to your computer and use it in GitHub Desktop.
Save ianjosephwilson/4651147 to your computer and use it in GitHub Desktop.
from formencode.schema import Schema
from formencode.validators import UnicodeString
from formencode import ForEach
from webob.multidict import MultiDict
d = MultiDict([('mlocales', 'en_US'), ('mlocales', 'en_GB')])
assert Schema(mlocales=ForEach(UnicodeString())).to_python(d) == {'mlocales': ['en_US', 'en_GB']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment