def param ( self , param , kwargs , default_value = False ) : if param in kwargs : value = kwargs [ param ] del kwargs [ param ] else : value = default_value setattr ( self , param , value )
python kwargs with default value
gets a param from kwargs or uses a default_value . if found it s removed from kwargs
def param (self, param, kwargs, default_value=False):
        """gets a param from kwargs, or uses a default_value. if found, it's
        removed from kwargs"""
        if param in kwargs:
            value= kwargs[param]
            del kwargs[param]
        else:
            value= default_value
        setattr (self, param, value)