featuremapper/__init__.py
def has_preference_fn(feature):
    """
    Answer True if the feature has a preference_fun set. 
    Answer False if not set or it does not have this attribute.
    """
    return hasattr(feature, 'preference_fn') and feature.preference_fn is not None

    Answer True if the feature has a preference_fun set. 
    Answer False if not set or it does not have this attribute.
    
Answer True if the feature has a preference_fun set.
Answer False if not set or it does not have this attribute.
Answer True if the feature has a preference_fun set . Answer False if not set or it does not have this attribute .
def has_preference_fn(feature):
    return hasattr(feature, 'preference_fn') and feature.preference_fn is not None
def has_preference_fn ( feature ) : return hasattr ( feature , 'preference_fn' ) and feature . preference_fn is not None
Answer True if the feature has a preference_fun set.
Answer True if the feature has a preference_fun set .
"""
    Answer True if the feature has a preference_fun set. 
    Answer False if not set or it does not have this attribute.
    """
feature