(rate_definition)
return {
        attribute.name: getattr(rate_definition, attribute.name)
        for attribute in RateDefinition.__attrs_attrs__
    }
Convert RateDefinition-like object to dict like {'per_week': ..., 'per_hour': ..., ...}
Convert RateDefinition-like object to dict like {'per_week': ..., 'per_hour': ..., ...}
Convert RateDefinition - like object to dict like { per_week : ... per_hour : ... ... }
def _get_rate_definition_dict(rate_definition):
    """
    Convert RateDefinition-like object to dict like {'per_week': ..., 'per_hour': ..., ...}
    """
    return {
        attribute.name: getattr(rate_definition, attribute.name)
        for attribute in RateDefinition.__attrs_attrs__
    }
def _get_rate_definition_dict ( rate_definition ) : return { attribute . name : getattr ( rate_definition , attribute . name ) for attribute in RateDefinition . __attrs_attrs__ }