bananas/environment.py
def get_parser(typ):
    """
    Return appropriate parser for given type.

    :param typ: Type to get parser for.
    :return function: Parser
    """
    try:
        return {
            str: parse_str,
            bool: parse_bool,
            int: parse_int,
            tuple: parse_tuple,
            list: parse_list,
            set: parse_set,
        }[typ]
    except KeyError:
        raise NotImplementedError("Unsupported setting type: %r", typ)
def get_parser(typ):
    try:
        return {
            str: parse_str,
            bool: parse_bool,
            int: parse_int,
            tuple: parse_tuple,
            list: parse_list,
            set: parse_set,
        }[typ]
    except KeyError:
        raise NotImplementedError("Unsupported setting type: %r", typ)
def get_parser ( typ ) : try : return { str : parse_str , bool : parse_bool , int : parse_int , tuple : parse_tuple , list : parse_list , set : parse_set , } [ typ ] except KeyError : raise NotImplementedError ( "Unsupported setting type: %r" , typ )
Return appropriate parser for given type.

    :param typ: Type to get parser for.
    :return function: Parser
Return appropriate parser for given type .