def get_prop_value ( name , props , default = None ) : # type: (str, Dict[str, Any], Any) -> Any if not props : return default try : return props [ name ] except KeyError : return default
python property get with default
Returns the value of a property or the default one
def get_prop_value(name, props, default=None):
    # type: (str, Dict[str, Any], Any) -> Any
    """
    Returns the value of a property or the default one

    :param name: Name of a property
    :param props: Dictionary of properties
    :param default: Default value
    :return: The value of the property or the default one
    """
    if not props:
        return default

    try:
        return props[name]
    except KeyError:
        return default