halotools.empirical_models.bind_default_kwarg_mixin_safe(obj, keyword_argument, constructor_kwargs, default_value)[source]

Function used to ensure that a keyword argument passed to the constructor of an orthogonal mix-in class is not already an attribute bound to self. If it is safe to bind the keyword_argument to the object, bind_default_kwarg_mixin_safe will do so.

objclass instance

Instance of the class to which we want to bind the input keyword_argument.


name of the attribute that will be bound to the object if the action is deemed mix-in safe.


keyword argument dictionary passed to the constructor of the input obj.


Whatever the default value for the attribute should be if keyword_argument does not appear in kwargs nor is it already bound to the obj.