There are two types of strings in Python 2.7: strand unicode. In Python 2.7, a type is strnot a Unicode string, it is a byte string.
, u'http://www.foo.com' str, . str Unicode Python 2.7, :
from voluptuous import Any, Schema, Required
schema = Schema({
Required('name'): Any(str, unicode),
Required('www'): Any(str, unicode),
})
, , Unicode, :
schema = Schema({
Required('name'): unicode,
Required('www'): unicode,
})