def __init__(self, value, strip=True, *args, **kw):
        try:
            if isinstance(value, basestring):
                value = value.strip()

                if value.lower() in ('yes', 'on', 'true', '1'):
                    self.value = True
                elif value.lower() in ('no', 'off', 'false', '0'):
                    self.value = False
                else:
                    self.value = False
            else:
                self.value = bool(value)
        except (ValueError, TypeError):
            raise ValueError(i18n._(u'Must be a boolean'))
Initialisation
dataset/ETHPy150Open Net-ng/kansha/kansha/validator.py/BoolValidator.__init__