Returns the concrete value of this bool if concrete, otherwise None.

        :return: Concrete value or None
177387
def value(self) -> Union[bool, None]:
        
        self.simplify()
        if self.is_true:
            return True
        elif self.is_false:
            return False
        else:
            return None
375210
def get_default_value(self):
        
        val = self.show
        if not val:
            val = self.raw_value
        if not val:
            val = self.showname
        return val
1284416
def to_bool(value):
    '''
    
    '''
    if isinstance(value, bool):
        return value
    elif isinstance(value, basestring):
        return value.lower() == 'true' or value.lower() == 't'
    elif isinstance(value, int):
        return value > 0
    else:
        return False
7334
def get_bool(self, key, default=None):
        
        value = self.get_str(key)
        if value is not None:
            return to_boolean(value)

        return default
810097
def getValue(self):
        
        func = dill.loads(self._func)
        return func(*self._args)
235185
def to_bool(value):
    '''
    
    '''
    value = from_bool(value)
    if isinstance(value, bool):
        value = 'on' if value else 'off'
    elif value is None:
        value = 'none'

    return value
975903
def GetValue(self, ignore_error=True):
    """"""
    if self.HasField("none"):
      return None

    field_names = [
        "integer", "string", "data", "boolean", "list", "dict", "rdf_value",
        "float", "set"
    ]

    values = [getattr(self, x) for x in field_names if self.HasField(x)]

    if len(values) != 1:
      return None

    if self.HasField("boolean"):
      return bool(values[0])

    # Unpack RDFValues.
    if self.HasField("rdf_value"):
      try:
        rdf_class = rdfvalue.RDFValue.classes[self.rdf_value.name]
        return rdf_class.FromSerializedString(
            self.rdf_value.data, age=self.rdf_value.age)
      except (ValueError, KeyError) as e:
        if ignore_error:
          return e

        raise

    elif self.HasField("list"):
      return [x.GetValue() for x in self.list.content]

    elif self.HasField("set"):
      return set([x.GetValue() for x in self.set.content])

    else:
      return values[0]
797081
def value(self):
        
        if self._value:
            return self._value
        if self.formatter:
            return self.formatter(self.raw)
        return self.raw
1349248
def value(self):
        
        try:
            return self._value.value()
        except UnresolvedVariableValue:
            raise UnresolvedVariable("<unknown>", self)
        except InvalidLookupConcatenation as e:
            raise InvalidLookupCombination(e.lookup, e.lookups, self)
646601
def get_cgi_parameter_bool_or_none(form: cgi.FieldStorage,
                                   key: str) -> Optional[bool]:
    
    return get_cgi_parameter_bool_or_default(form, key, default=None)
1018374
def to_bool(value):
    
    if value is None:
        return None
    if isinstance(value, bool):
        return value
    elif isinstance(value, str):
        if value=="no":
            return False
        elif value=="yes":
            return True
671548
def checkValue(self,value,strict=0):
        
        v = self._coerceValue(value,strict)
        return self.checkOneValue(v,strict)
1347247
def from_bool(value):
    '''
    
    '''
    if value in ['on', 'yes']:
        value = True
    elif value in ['off', 'no']:
        value = False
    elif value == 'none':
        value = None

    return value
287361
def isNull(self):
        
        check = self.raw_values.copy()
        scope = check.pop('scope', {})
        return len(check) == 0 and len(scope) == 0
329869
def optional(self, value = None):
		

		# If there's no value, this is a getter
		if value is None:
			return this._optional

		# Else, set the flag
		else:
			this._optional = value and True or False
152495
def get(self, block=True, timeout=None):
        
        value = self._queue.get(block, timeout)
        if self._queue.empty():
            self.clear()
        return value
439586
def get_bool_value(self, section, option, default=True):
        """"""
        try:
            return self.parser.getboolean(section, option)
        except NoOptionError:
            return bool(default)