Only called if field.default != NOT_PROVIDED
341671
def _generate_field_with_default(**kwargs):
        """"""
        field = kwargs['field']
        if callable(field.default):
            return field.default()
        return field.default
474361
function(filterFieldName) {
                var val = this.getActiveFilterFields(true)[filterFieldName];
                return (_.isNull(val) || _.isUndefined(val)) ? null : val;
            }
313102
def _check_required_fields(self, object_type, ignore_fields):
        # type: (str, List[str]) -> None
        
        for field in self.configuration[object_type]['required_fields']:
            if field not in self.data and field not in ignore_fields:
                raise HDXError('Field %s is missing in %s!' % (field, object_type))
395704
def oc_attr_isdefault(o):
    """"""
    if not o._changed() and not o.default():
        return True
    if o == o.default():
        return True
    return False
1145484
function provided(field, rtn=undefined) {
  return field !== null && field !== undefined && field !== '' ? field : rtn;
}
75881
def on_bind_field(self, field_name, field_obj):
        
        if _MARSHMALLOW_VERSION_INFO[0] < 3:
            if not field_obj.load_from:
                field_obj.load_from = self.inflect(field_name)
        else:
            if not field_obj.data_key:
                field_obj.data_key = self.inflect(field_name)
        return None
250136
def _set_field_if_present(cls, block, name, value, attrs):
        """"""
        if name in block.fields:
            value = (block.fields[name]).from_string(value)
            if "none" in attrs and attrs["none"] == "true":
                setattr(block, name, None)
            else:
                setattr(block, name, value)
        else:
            logging.warning("XBlock %s does not contain field %s", type(block), name)
123325
def method_missing(name, *args, &blk)
      if name.to_s =~ /^default_(.*)=$/
        @default_options[$1.to_sym] = args.first
      elsif name.to_s =~ /=$/
        @dirty_options[$`.to_sym] = args.first
      elsif @default_options.key?(name)
        dirty_or_db_setting_or_default(name)
      else
        super
      end
    end
887767
def warn_if_fields_defined_in_meta(fields, Meta):
    
    if getattr(Meta, "fields", None) or getattr(Meta, "additional", None):
        declared_fields = set(fields.keys())
        if (
            set(getattr(Meta, "fields", set())) > declared_fields
            or set(getattr(Meta, "additional", set())) > declared_fields
        ):
            warnings.warn(
                "Only explicitly-declared fields will be included in the Schema Object. "
                "Fields defined in Meta.fields or Meta.additional are ignored."
            )
810782
def _default(self):
        
        if self.ctx.ignore_default:
            if not self.ctx.ignore_missing:
                self.ctx.errors.missing()
            return NOT_SET
        if self.default is NOT_SET:
            if not self.ctx.ignore_missing:
                self.ctx.errors.missing()
            return NOT_SET
        if self.default in IGNORE:
            return self.default
        if isinstance(self.default, Hook):
            if self.default:
                return self.default()
            if not self.ctx.ignore_missing:
                self.ctx.errors.missing()
            return NOT_SET
        if isinstance(self.default, type) or callable(self.default):
            return self.default()
        return self.default
1231776
private void checkAndApplyDefaultValue(Option o, Map<String, String> data) throws RequiredParametersException {
		if (hasNoDefaultValueAndNoValuePassedOnAlternativeName(o, data)) {
			throw new RequiredParametersException("No default value for undefined parameter " + o.getName());
		}
	}
1258115
def is_optional(attr):
    
    return isinstance(attr.validator, _OptionalValidator) or (attr.default is not None and attr.default is not NOTHING)
1036665
def is_none(entity, prop, name):
    ""
    return is_not_empty(entity, prop, name) and getattr(entity, name) is None
404746
def method_call_if_def(obj, attr_name, m_name, default, *args, **kwargs):
    
    try:
        attr = getattr(obj, attr_name)
    except AttributeError:
        return default
    else:
        return getattr(attr, m_name)(*args, **kwargs)
507606
def _wrap_field(field):
    """"""
    class WrappedField(field):
        def output(self, key, obj):
            value = _fields.get_value(key if self.attribute is None else self.attribute, obj)

            # For all fields, when its value was null (None), return null directly,
            #  instead of return its default value (eg. int type's default value was 0)
            # Because sometimes the client **needs** to know, was a field of the model empty, to decide its behavior.
            return None if value is None else self.format(value)
    return WrappedField
111099
def _prepare_defaults(self):
		""""""
		
		for name, field in self.__fields__.items():
			if field.assign:
				getattr(self, name)
823212
def get(self, field_name, default=None):
        """"""
        checkFieldName(field_name)
        return self.data.get(field_name, default)