Render a 'true' or (if available) 'false' block based on a
        boolean.
504572
def render(self, namespace):
        ''''''
        if (self._isbool and
            namespace[self._evaluate]) or \
            (not self._isbool and
             namespace[self._evaluate](*[namespace[arg]
                                         for arg in self._args])):
            return self._block_true.render(namespace)
        if self._block_false is not None:
            return self._block_false.render(namespace)
        return None
1203989
def get_bool(self, key, default=None):
        
        """
        return self.get_converted(
            key, ConversionTypeEnum.BOOL, default=default)
758590
def bool(anon, obj, field, val):
    
    return anon.faker.bool(field=field)
991473
def check_booleans!
      booleans_hash.each do |key, value|
        unless BOOLEANS.include?(value)
          raise ArgumentError, "Expected `#{key}` to be either true, false or nil, got #{value}"
        end
      end
    end
1104417
def validate_bool(b):
    """"""
    if isinstance(b, six.string_types):
        b = b.lower()
    if b in ('t', 'y', 'yes', 'on', 'true', '1', 1, True):
        return True
    elif b in ('f', 'n', 'no', 'off', 'false', '0', 0, False):
        return False
    else:
        raise ValueError('Could not convert "%s" to boolean' % b)
1075049
function parseBoolean(value, context) {
    if (value === true || value === 'true') return true;
    if (value === false || value === 'false') return false;
    throw new ImplementationError(`Invalid boolean value "${value}"${context.errorContext}`);
}
665689
def __convert_bool(node):
    """"""
    converted = __convert_node(node, default_value='true')

    # Check for a switch for reversing the value
    reverse_switch = __get_attribute(node, 'ReverseSwitch')

    if reverse_switch:
        converted_reverse = copy.deepcopy(converted)

        converted_reverse['switch'] = reverse_switch
        converted_reverse['value'] = 'false'

        return [converted_reverse, converted]

    # Modify flags when there is an argument child
    __with_argument(node, converted)

    return __check_for_flag(converted)
232402
def boolean(value):
    '''
    
    '''
    if value is None or isinstance(value, bool):
        return value

    try:
        return bool(int(value))
    except ValueError:
        lower_value = value.strip().lower()
        if not lower_value:
            return None
        if lower_value in ('f', 'false', 'n', 'no', 'off'):
            return False
        if lower_value in ('on', 't', 'true', 'y', 'yes'):
            return True
        raise Invalid('Unable to parse boolean {0}'.format(value))
753276
def write_bool(self, flag):
        
        if flag:
            self.write(b"\x01")
        else:
            self.write(b"\x00")
682369
function isBool(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && typeof value !== 'boolean') {
        throw TypeException.unexpectedType(assertionTypes.IS_BOOL, value, '<boolean>', message, id);
    }
}
817539
def _cast_boolean(self, value):
        
        if value.lower() not in self._BOOLEANS:
            raise ValueError('Not a boolean: %s' % value)

        return self._BOOLEANS[value.lower()]
1053311
def _to_bool(value):
        """"""
        bool_value = False
        if str(value).lower() in ['1', 'true']:
            bool_value = True
        return bool_value
374780
public static Boolean toBoolean(Object o) throws PageException {
	if (o instanceof Boolean) return (Boolean) o;
	return toBooleanValue(o) ? Boolean.TRUE : Boolean.FALSE;

    }
558490
def _set_bool_prop(self, name, value):
        
        rPr = self._element.get_or_add_rPr()
        rPr._set_bool_val(name, value)
1103342
function Boolean(value) {
	spec.Asn1Spec.call(this, new spec.Asn1Tag(spec.TagClass.Universal, spec.TagFormat.Primitive, UniversalTag.Boolean));
	this.value = value || false;
}
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
241041
function() {
    this.jsonInit({
      "message0": "%1",
      "args0": [
        {
          "type": "field_dropdown",
          "name": "BOOL",
          "options": [
            [Blockly.Msg.LOGIC_BOOLEAN_TRUE, "TRUE"],
            [Blockly.Msg.LOGIC_BOOLEAN_FALSE, "FALSE"]
          ]
        }
      ],
      "output": "Boolean",
      "colour": Blockly.Blocks.logic.HUE,
      "tooltip": Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP,
      "helpUrl": Blockly.Msg.LOGIC_BOOLEAN_HELPURL
    });
  }