def __init__(self, fieldType='text-single', var=None, value=None,
                       values=None, options=None, label=None, desc=None,
                       required=False):
        """
        Initialize this field.

        See the identically named instance variables for descriptions.

        If C{value} is not C{None}, it overrides C{values}, setting the
        given value as the only value for this field.
        """

        self.fieldType = fieldType
        self.var = var

        if value is not None:
            self.value = value
        else:
            self.values = values or []

        self.label = label

        try:
            self.options = [Option(optionValue, optionLabel)
                            for optionValue, optionLabel
                            in options.iteritems()]
        except __HOLE__:
            self.options = options or []

        self.desc = desc
        self.required = required
dataset/ETHPy150Open ralphm/wokkel/wokkel/data_form.py/Field.__init__